Validate the properties have the correct values.
422355
public final void postConstruct() {
        Assert.equals(2, this.tileSize.length, "tileSize must have exactly 2 elements to the array.  Was: " +
                Arrays.toString(this.tileSize));
        Assert.equals(2, this.topLeftCorner.length,
                      "topLeftCorner must have exactly 2 elements to the array.  Was: " +
                              Arrays.toString(this.topLeftCorner));
        Assert.equals(2, this.matrixSize.length,
                      "matrixSize must have exactly 2 elements to the array.  Was: " +
                              Arrays.toString(this.matrixSize));
    }
1264764
def validate(self):
        """"""
        if not (isinstance(self.start_class, set) and
                all(isinstance(x, six.string_types) for x in self.start_class)):
            raise TypeError(u'Expected set of string start_class, got: {} {}'.format(
                type(self.start_class).__name__, self.start_class))

        for cls in self.start_class:
            validate_safe_string(cls)
733699
def validate(self, key, value):
    """"""
    if self._validator is not None:
      self._validator(key, value)
593431
def validate(self, data):
        """"""
        validated = self._validated(data)
        errors = []
        for validator in self.additional_validators:
            if not validator(validated):
                errors.append(
                    "%s invalidated by '%s'" % (
                        validated, _get_repr(validator)))
        if errors:
            raise NotValid(*errors)

        if self.default is UNSPECIFIED:
            return validated

        if self.null_values is not UNSPECIFIED\
                and validated in self.null_values:
            return self.default

        if validated is None:
            return self.default

        return validated
234772
def validate(self, value):
        """"""
        value = self.pre_validate(value)
        if not self._typecheck(value):
            raise ValueError('%r failed type check' % value)
        return value
29499
def validate_properties(props, required):
    

    props = set(props)
    required = set(required or _supported_props)

    if len(required.intersection(props)) < len(required):
        missing = required - props
        raise ValidationError(
            'Missing property names: {props}', props=','.join(missing), missing=missing
        )
705723
def validate(self):
        
        validation_result = []
        for attr_name, value in [(attr, getattr(self, attr)) for attr in self._attribute_map]:
            attr_desc = self._attribute_map[attr_name]
            if attr_name == "additional_properties" and attr_desc["key"] == '':
                # Do NOT validate additional_properties
                continue
            attr_type = attr_desc['type']

            try:
                debug_name = "{}.{}".format(self.__class__.__name__, attr_name)
                Serializer.validate(value, debug_name, **self._validation.get(attr_name, {}))
            except ValidationError as validation_error:
                validation_result.append(validation_error)

            validation_result += _recursive_validate(attr_name, attr_type, value)
        return validation_result
68367
def validate(self):
        """"""
        try:
            for pkg in self.resolved_packages:
                pkg.validate_data()
        except RezError as e:
            raise ResolvedContextError("%s: %s" % (e.__class__.__name__, str(e)))
381067
def validate(self, settings):
        """"""

        if self.envs is None:
            self.envs = [settings.current_env]

        if self.when is not None:
            try:
                # inherit env if not defined
                if self.when.envs is None:
                    self.when.envs = self.envs

                self.when.validate(settings)
            except ValidationError:
                # if when is invalid, return canceling validation flow
                return

        # If only using current_env, skip using_env decoration (reload)
        if (
            len(self.envs) == 1
            and self.envs[0].upper() == settings.current_env.upper()
        ):
            self._validate_items(settings, settings.current_env)
            return

        for env in self.envs:
            with settings.using_env(env):
                self._validate_items(settings, env)
163899
def matches(property_name, regex, *, present_optional=False, message=None):
    """"""
    def check(val):
      """Checks that a value matches a scope-enclosed regex."""
      if not val:
        return present_optional
      else:
        return True if regex.search(val) else False

    return Validation(check, property_name, message)
1144370
def validate(self, val):
        """"""
        if self.validation:
            self.type.validate(val)

            if self.custom_validator is not None:
                self.custom_validator(val)

        return True
969689
public static void validateAllOrNone(Props props, String... keys) {
    Objects.requireNonNull(keys);

    boolean allExist = true;
    boolean someExist = false;
    for (String key : keys) {
      Object val = props.get(key);
      allExist &= val != null;
      someExist |= val != null;
    }

    if (someExist && !allExist) {
      throw new IllegalArgumentException(
          "Either all of properties exist or none of them should exist for " + Arrays
              .toString(keys));
    }
  }
381673
def validate(self, model, validator=None):
    
    for filter_ in self.filters:
      if not filter_(model):
        return True

    is_valid, message = self.is_valid(model, validator)
    if not is_valid:
      model.add_error(self.pretty_property_name or self.property_name, message)
    return is_valid
1370108
def validate( self ):
        """"""
        klass = self.__class__

        for name in klass._fields:
            self.validate_field( name )
        return
989594
def validate(self):
        """"""
        # check if required_fields aren't present
        for field in set(self.required_fields) - set(self.request_data):
            if not isinstance(field, string_types):
                # field was a collection, iterate over it and check by OR
                return bool(set(field) & set(self.request_data))
            return False
        return True
479950
def validatePage(self):
        
        widgets = self.propertyWidgetMap()
        failed = ''
        for prop, widget in widgets.items():
            val, success = projexui.widgetValue(widget)
            
            if success:
                # ensure we have the required values
                if not val and not (prop.type == 'bool' and val is False):
                    if prop.default:
                        val = prop.default
                    elif prop.required:
                        msg = '{0} is a required value'.format(prop.label)
                        failed = msg
                        break
                
                # ensure the values match the required expression
                elif prop.regex and not re.match(prop.regex, nativestring(val)):
                    msg = '{0} needs to be in the format {1}'.format(prop.label,
                                                                 prop.regex)
                    failed = msg
                    break
                
                prop.value = val
            else:
                msg = 'Failed to get a proper value for {0}'.format(prop.label)
                failed = msg
                break
        
        if failed:
            QtGui.QMessageBox.warning(None, 'Properties Failed', failed)
            return False

        return True
816881
def _verify_validates(self, spec, path):
        """"""
        validates = spec['validates']

        if isinstance(validates, list):
            for validator in validates:
                self._verify_validator(validator, path)
        else:
            self._verify_validator(validates, path)