Validate sub entities ensuring the existence of a relationship and if an embedded link then ensure the
existence of an href.
@param obj assumed not <code>null</code>.
484369
private void validateSubEntities(Entity obj) {
        // Validate that all sub entities have a "rel" set.
        String relRequired = "Sub entities are required to have a <rel> property set.";
        String hrefReqForEmbed = "Sub entities that are embedded links are required to have a <href> property set.";
        if (!CollectionUtils.isEmpty(obj.getEntities())) {
            for (Entity e : obj.getEntities()) {
                if (e.getRel() == null || ArrayUtils.isEmpty(e.getRel())) {
                    throw new Siren4JBuilderValidationException("entities", obj.getClass(), relRequired);
                }
                if ((e instanceof EmbeddedEntityImpl) && StringUtils.isBlank(e.getHref())) {
                    throw new Siren4JBuilderValidationException("entities", obj.getClass(), hrefReqForEmbed);
                }
            }
        }
    }
1069422
function ( obj ) {
		return obj.nodeName === "FORM" ? false : validate.test( {alphanum  : obj.value || element.text( obj )} ).pass;
	}
1191356
def _validate_ctypes(self, from_obj, to_obj):
        
        if from_obj:
            from_ctype = ContentType.objects.get_for_model(from_obj)
            assert from_ctype.natural_key() == self.from_content_type.natural_key(), (
                'Relationship "%s" does not support connections '
                'from "%s" types' % (self.name, from_ctype))
        if to_obj:
            to_ctype = ContentType.objects.get_for_model(to_obj)
            assert to_ctype.natural_key() == self.to_content_type.natural_key(), (
                'Relationship "%s" does not support connections '
                'to "%s" types' % (self.name, to_ctype))
729448
function (obj) {
        return Boolean(obj) && ((obj instanceof CertificateList) ||
          _.inSuperChain(obj.constructor, '_postman_propertyName', CertificateList._postman_propertyName));
    }
114385
function(obj) {
      if (obj == null) return void 0;
      return this._byId[obj] ||
        this._byId[this.entityId(obj.attributes || obj)] ||
        obj.cid && this._byId[obj.cid];
    }
925522
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        nullGuards.clear();
        super.visitCode(obj);
    }
113065
function checkObj(instance,objTypeDef,path,additionalProp){

         if(typeof objTypeDef =='object'){
             if(typeof instance != 'object' || instance instanceof Array){
                 errors.push({property:path,message:"an object is required"});
             }

             for(var i in objTypeDef){
                 if(objTypeDef.hasOwnProperty(i)){
                     var value = instance[i];
                     // skip _not_ specified properties
                     if (value === undefined && options.existingOnly) continue;
                     var propDef = objTypeDef[i];
                     // set default
                     if(value === undefined && propDef["default"]){
                         value = instance[i] = propDef["default"];
                     }
                     if(options.coerce && i in instance){
                         value = instance[i] = options.coerce(value, propDef);
                     }
                     checkProp(value,propDef,path,i);
                 }
             }
         }
         for(i in instance){
             if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_')
                 && objTypeDef && !objTypeDef[i] && additionalProp===false){
                 if (options.filter) {
                     delete instance[i];
                     continue;
                 } else {
                     errors.push({property:path,message:(typeof value) + "The property " + i +
                         " is not defined in the schema and the schema does not allow additional properties"});
                 }
             }
             var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
             if(requires && !(requires in instance)){
                 errors.push({property:path,message:"the presence of the property " + i + " requires that " +
                   requires + " also be present"});
             }
             value = instance[i];
             if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
                 if(options.coerce){
                     value = instance[i] = options.coerce(value, additionalProp);
                 }
                 checkProp(value,additionalProp,path,i);
             }
             if(!_changing && value && value.$schema){
                 errors = errors.concat(checkProp(value,value.$schema,path,i));
             }
         }
         return errors;
       }
155169
def validate(self, obj, pointer=None):
        

        pointer = pointer or '#'

        validator = deepcopy(self)
        validator.errors = []
        validator.fail_fast = False

        obj = deepcopy(obj)
        obj = validator.validate_enum(obj, pointer)
        obj = validator.validate_type(obj, pointer)
        obj = validator.validate_disallow(obj, pointer)
        obj = validator.validate_extends(obj, pointer)

        if validator.is_array(obj):
            obj = validator.validate_max_items(obj, pointer)
            obj = validator.validate_min_items(obj, pointer)
            obj = validator.validate_items(obj, pointer)
            obj = validator.validate_unique_items(obj, pointer)

        if validator.is_number(obj):
            obj = validator.validate_maximum(obj, pointer)
            obj = validator.validate_minimum(obj, pointer)
            obj = validator.validate_divisible_by(obj, pointer)

        if validator.is_object(obj):
            obj = validator.validate_dependencies(obj, pointer)
            obj = validator.validate_properties(obj, pointer)

        if validator.is_string(obj):
            obj = validator.validate_max_length(obj, pointer)
            obj = validator.validate_min_length(obj, pointer)
            obj = validator.validate_pattern(obj, pointer)
            obj = validator.validate_format(obj, pointer)

        if validator.errors:
            raise ValidationError('multiple errors',
                                  obj,
                                  errors=validator.errors)

        return obj
323867
public boolean matches(Object obj) {
        if (!(obj instanceof Exception))
            return false;

        Exception exception = (Exception) obj;

        return exception.getCause() == null;
    }
871141
def validate(obj, schema):
        
        if isinstance(obj, str):
            obj = json.loads(obj)
        return JsonValidator(schema)._validate(obj)
884964
def validate(self, obj):
        """"""
        if 'tags' in obj and not isinstance(obj['tags'], list):
            raise aomi_excep.Validation('tags must be a list')

        if self.present:
            check_obj(self.required_fields, self.name(), obj)
408903
@Override
    public ValidationResult validate(Object value) {
        if (value == null || value instanceof String) {
            return new ValidationResult.ValidationPassed();
        } else {
            return new ValidationResult.ValidationFailed("Value \"" + value + "\" is not a valid string!");
        }
    }
454879
public void validateVerification(int id, String code) {
		getResourceFactory().getApiResource("/hook/" + id + "/verify/validate")
				.entity(new HookValidate(code), MediaType.APPLICATION_JSON)
				.post();
	}
948029
@Nonnull
  public static <T> T checkNotNull(@Nullable T obj) {
    return checkNotNull(obj, NPE_DEFAULT_MSG);
  }
881440
def validate(self, obj):
        """"""
        if self.path:
            for i in self.path:
                obj = obj[i]
        obj = obj[self.field]

        raise NotImplementedError('Validation is not implemented yet')
528127
private void checkXMLSpaceAttribute(SVG.SvgObject obj)
   {
      if (!(obj instanceof SvgElementBase))
        return;

      SvgElementBase bobj = (SvgElementBase) obj;
      if (bobj.spacePreserve != null)
         state.spacePreserve = bobj.spacePreserve;
   }
627955
private <X> void validate(Class<X> clazz, boolean isEmbeddable)
    {
        final String mappedSuperClazzErrMsg = "Class:" + clazz
                + "is annotated with @MappedSuperClass and @Entity not allowed";
        final String embeddableClazzErrMsg = "Class:" + clazz + "is annotated with @Embeddable and @Entity not allowed";
        if (clazz.isAnnotationPresent(Entity.class))
        {
            throw new MetamodelLoaderException(isEmbeddable ? embeddableClazzErrMsg : mappedSuperClazzErrMsg);
        }
    }