Perform validation check on properties.
19952
def validate(self):
        
        if not self.api_token or not self.api_token_secret:
            raise ImproperlyConfigured("'api_token' and 'api_token_secret' are required for authentication.")

        if self.response_type not in ["json", "pson", "xml", "debug", None]:
            raise ImproperlyConfigured("'%s' is an invalid response_type" % self.response_type)
868291
function checkProperties(name){
  var bul=false; // boolean to control if its defined the property

  for(var i=0; i<properties.length; i++){//iterate over prop names
    if(properties[i] === name){//if it is
      bul=true;
    }
  }
  if(bul!==true){// it isn't finded the statement of the tag
    throw new Error('Not defined '+name);
    }  
}
530307
def validate(config):
    """"""
    with open(config) as fh:
        data = utils.yaml_load(fh.read())
        jsonschema.validate(data, CONFIG_SCHEMA)
154441
def validate(self, instance):
        """"""
        errors = {}
        self._validate_instance(instance, errors)

        if len(errors) > 0:
            raise ValidationException(errors)
1083272
def _check_valid(key, val, valid):
    """"""
    if val not in valid:
        raise ValueError('%s must be one of %s, not "%s"'
                         % (key, valid, val))
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
625610
function validateOptsProperties(opts, validProperties) {
  var validProps = ensureVector(validProperties);
  var allOpts = jd.vector(Object.keys(opts), 'string');
  var invalidOpts = allOpts.s(allOpts.isIn(validProps).not());
  if (invalidOpts.size() > 0) {
    throw new Error('invalid properties found in "opts": ' +
      invalidOpts.strJoin(', '));
  }
}
257033
def _validate_props(self):
        """"""
        for key, prop in iteritems(self._props):
            try:
                value = self._get(key)
                err_msg = 'Invalid value for property {}: {}'.format(key, value)
                if value is not None:
                    change = dict(name=key, previous=value, value=value,
                                  mode='validate')
                    self._notify(change)
                    if not prop.equal(value, change['value']):
                        raise utils.ValidationError(err_msg, 'invalid',
                                                    prop.name, self)
                if not prop.assert_valid(self):
                    raise utils.ValidationError(err_msg, 'invalid',
                                                prop.name, self)
            except utils.ValidationError as val_err:
                if getattr(self, '_validation_error_tuples', None) is not None:
                    self._validation_error_tuples += val_err.error_tuples
                else:
                    raise
        return True
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)))
587367
def validate (properties):
    
    if isinstance(properties, Property):
        properties = [properties]
    assert is_iterable_typed(properties, Property)
    for p in properties:
        __validate1(p)
206244
def _validated(self, data):
        """"""
        errors = []
        for sub in self.schemas:
            try:
                return sub(data)
            except NotValid as ex:
                errors.extend(ex.args)

        raise NotValid(' and '.join(errors))
923618
public void validate(String propertyName) {
        if (whitelist != null && whitelist.contains(propertyName)) {
            lastValid = true;
            return;
        }
        if (blacklist != null && blacklist.contains(propertyName)) {
            lastValid = false;
            getUnknownProperties().add(propertyName);
            return;
        }

        lastValid = desc.isValidExpression(propertyName);
        super.validate(propertyName);
    }
733699
def validate(self, key, value):
    """"""
    if self._validator is not None:
      self._validator(key, value)
930838
def validate(self, model, checks=[]):
        """"""
        custom = [
            check_partial(reaction_id_check,
                          frozenset(r.id for r in model.reactions))
        ]
        super(Medium, self).validate(model=model, checks=checks + custom)
158425
def check(self, options=None):
        """"""
        self.check_values(options)
        self.check_attributes(options)
        self.check_values(options)
        return self
819673
def validate(self, data):
        '''
        
        '''
        for prop in self.properties:
            if prop.id in data:
                if prop.type == 'string':
                    if not isinstance(data[prop.id], basestring):
                        raise PresetFieldTypeException("property '{}' must be of type string".format(prop.id))
                elif prop.type == 'enum':
                    if not isinstance(data[prop.id], basestring):
                        raise PresetFieldTypeException("property '{}' must be of type string".format(prop.id))
                    if data[prop.id] not in prop.values:
                        raise PresetException("property '{}' can be one of {}".format(prop.id, prop.values))
            else:
                if prop.required:
                    raise PresetMissingFieldException("missing required property: '{}'".format(prop.id))
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