Override for Property._check_property().

    Raises:
      InvalidPropertyError if no subproperty is specified or if something
      is wrong with the subproperty.
513558
def _check_property(self, rest=None, require_indexed=True):
    
    if not rest:
      raise InvalidPropertyError(
          'Structured property %s requires a subproperty' % self._name)
    self._modelclass._check_properties([rest], require_indexed=require_indexed)
1049135
def check(cls):
        
        attribs = [
            'app_version',
            'app_name',
            'config_file_path',
            'config_sep_str',
        ]
        for attrib in attribs:
            if getattr(cls, attrib) == 'not_set':
                raise IncompleteSetupError(f'elib_config setup is incomplete; missing: {attrib}')
1200894
def has_own_property(self, attr):
        
        try:
            object.__getattribute__(self, attr)
        except AttributeError:
            return False
        else:
            return True
117903
function checkProperty1(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) i += l;
  else return 0;

  return i - start;
}
1265878
def __validation_property_range(self, p):
        
        for y in p.included_ranges():
            superclasses = y.super_classes_closure()
            for q in p.super_properties():
                if not any(r == y or r in superclasses for r in q.included_ranges()) and not any(
                        r == y or r in superclasses for s in q.super_properties_closure() for r in
                        s.included_ranges()):
                    raise ValidationError("Range {} of property {} isn't a subclass of any range of"
                                          " superproperty {}".format(y.name(), p.name(), q.name()))
719865
public void assertNotNull(Object propertyValue, String propertyName) {
        if (propertyValue == null) {
            problemReporter.report(new Problem(this, String.format("%s is a required property.", propertyName)));
        }
    }
367976
def matches(self, properties):
        
        try:
            # Use the comparator
            return self.comparator(self.value, properties[self.name])
        except KeyError:
            # Criterion key is not in the properties
            return False
717686
def check(self):
        
        try:
            value = self.raw_value
        except (AttributeError, KeyError) as err:
            self._reraise_if_required(err)
        else:
            if self.checker:
                self.checker(self.full_name, value)
            try:
                self.validate(value)
                self.run_validators(value)
            except ValidationError as error:
                raise ValueError("Setting {} has an invalid value: {}".format(self.full_name, error))
1234202
def assert_valid(self, instance, value=None):
        """"""
        valid = super(Union, self).assert_valid(instance, value)
        if not valid:
            return False
        if value is None:
            value = instance._get(self.name)
            if value is None:
                return True
        return self._try_prop_method(instance, value, 'assert_valid')
587367
def validate (properties):
    
    if isinstance(properties, Property):
        properties = [properties]
    assert is_iterable_typed(properties, Property)
    for p in properties:
        __validate1(p)
633568
def check(self, value, namespace):
        
        if (not issubclass(type(value), self._cls) or
            len(value) != len(self._cls._fields)):
            return False
        for i, check in enumerate(self._checks):
            if not check(value[i], namespace):
                return False
        return True
1355984
def assert_valid(self, instance, value=None):
        """"""
        valid = super(Dictionary, self).assert_valid(instance, value)
        if not valid:
            return False
        if value is None:
            value = instance._get(self.name)
        if value is None:
            return True
        if self.key_prop or self.value_prop:
            for key, val in iteritems(value):
                if self.key_prop:
                    self.key_prop.assert_valid(instance, key)
                if self.value_prop:
                    self.value_prop.assert_valid(instance, val)
        return True
340998
def validate(self):
        

        missing = self.missing_property_names()

        if len(missing) > 0:
            raise validators.ValidationError(
                "'{0}' are required attributes for {1}"
                            .format(missing, self.__class__.__name__))

        for prop, val in six.iteritems(self._properties):
            if val is None:
                continue

            if isinstance(val, ProtocolBase):
                val.validate()
            elif getattr(val, 'isLiteralClass', None) is True:
                val.validate()
            elif isinstance(val, list):
                for subval in val:
                  subval.validate()
            else:
                # This object is of the wrong type, but just try setting it
                # The property setter will enforce its correctness
                # and handily coerce its type at the same time
                setattr(self, prop, val)

        return True
155901
private function validate() {
        $errors = [];

        foreach ($this->eventDetails as $key => $value) {
            if (strpos($key, 'tp_') !== false) {
                $errors[$key] = 'Property names cannot start with the reserved prefix \'tp_\'';
            }
            if (strpos($key, '.') !== false) {
                $errors[$key] = 'Property names cannot contain a period (.)';
            }
            if (strcmp($key, '_id') == 0) {
                $errors[$key] = 'Top level properties cannot be named \'_id\'';
            }
        }

        if (!empty($errors)) {
            throw new InvalidPropertyNameException($errors);
        }
    }
263894
function validateRequiredPropertiesExist (schema, schemaId) {
  /**
   * Recursively collects all properties of the schema and its ancestors. They are added to the props object.
   */
  function collectProperties (schemaObj, props) {
    if (schemaObj.properties) {
      for (var property in schemaObj.properties) {
        if (schemaObj.properties.hasOwnProperty(property)) {
          props[property] = schemaObj.properties[property];
        }
      }
    }
    if (schemaObj.allOf) {
      schemaObj.allOf.forEach(function (parent) {
        collectProperties(parent, props);
      });
    }
  }

  if (schema.required && Array.isArray(schema.required)) {
    var props = {};
    collectProperties(schema, props);
    schema.required.forEach(function (requiredProperty) {
      if (!props[requiredProperty]) {
        throw ono.syntax("Validation failed. Property '%s' listed as required but does not exist in '%s'",
          requiredProperty, schemaId);
      }
    });
  }
}
1077321
function isError(val, prop) {
    if (!isValue(val) || !isObject(val))
        return false;
    var type = constant_1.toStr.call(val).toLowerCase();
    return type === '[object error]' || type === '[object domexception]' || !isEmpty(val[prop]);
}
177815
def assert_valid(self, instance, value=None):
        """"""
        valid = super(Instance, self).assert_valid(instance, value)
        if not valid:
            return False
        if value is None:
            value = instance._get(self.name)
        if isinstance(value, HasProperties):
            value.validate()
        return True