Validate that this object is what it advertises.

@param object
164732
protected function validate($object)
    {
        $object = (object) $object;

        if ($object instanceof $this->is) {
            return $object;
        }

        throw new \DomainException(
            sprintf(
                "The Asset advertised as being of type %s is actually of type %s",
                $this->is,
                get_class($object)
            )
        );
    }
760144
protected function validate($object): void
    {
        $needType = $this->type();

        if (!$object instanceof $needType) {
            throw new \InvalidArgumentException("Element " . get_class($object) . " must be instance of " . $needType);
        }
    }
1292414
Boolean prevalidateObject(MtasParserObject object,
      Map<String, List<MtasParserObject>> currentList) {
    MtasParserType objectType = object.getType();
    List<MtasParserMapping<?>> mappings = objectType.getItems();
    if (mappings.isEmpty()) {
      return true;
    }
    for (MtasParserMapping<?> mapping : mappings) {
      try {
        precheckMappingConditions(object, mapping.getConditions(), currentList);
        return true;
      } catch (MtasParserException e) {
        log.debug(e);
      }
    }
    return false;
  }
757443
private boolean validateMinValue(Object validationObject, Annotation annotate)
    {
        if (checkNullObject(validationObject))
        {
            return true;
        }

        Long minValue = ((Min) annotate).value();
        if (checkvalidDigitTypes(validationObject.getClass()))
        {
            if ((NumberUtils.toLong(toString(validationObject))) < minValue)
            {

                throwValidationException(((Min) annotate).message());
            }
        }

        return true;
    }
278207
protected function validateAttribute($object, $attribute)
    {
        $method = $this->method;
        $object->{$method}($attribute, $this->params);
    }
1039103
function _isValidObject(object) {
	if (!object || Array.isArray(object) || typeof(object) !== 'object') {
		logger('AMBUSH_INVALID_DATA');
		return false;
	}

	return true;
}
421280
private static boolean isArrayLike(Object object)
  {
    return object != null && (object.getClass().isArray() || object instanceof Collection);
  }
321034
public void validate(Object o)
    {
        String s = String.valueOf(o);
        int i = s.indexOf(".");
        if (i == -1)
        {
            if ((m_integerDigits != -1 && s.length() > m_integerDigits))
            {            	
                String message = m_propertyMetadata.getMessageSourceAccessor().getMessage(m_message, new Object[]{ m_propertyMetadata.getLabelName(), m_integerDigits,m_fractionalDigits, String.valueOf(o) });
                throw new ValidationException(message);
            }
        }
        else
        {
            if (m_integerDigits != -1 && s.length() > m_integerDigits)
            {
                String message = m_propertyMetadata.getMessageSourceAccessor().getMessage(m_message, new Object[]{ m_propertyMetadata.getLabelName(), m_integerDigits,m_fractionalDigits,String.valueOf(o) });
                throw new ValidationException(message);
            }
            if (m_fractionalDigits != -1 && (s.length()-(i+1)) > m_fractionalDigits)
            {
                String message = m_propertyMetadata.getMessageSourceAccessor().getMessage(m_message, new Object[]{ m_propertyMetadata.getLabelName(),m_integerDigits,m_fractionalDigits, String.valueOf(o) });
                throw new ValidationException(message);
            }
        }
   }
812987
function booleanFalse(validatedObject, errorText) {
  if (!_.isBoolean(validatedObject) || validatedObject) {
    throw new ValidationError(errorText || 'Validated object is not False');
  }
  return validatedObject;
}
749374
private boolean validateSize(Object validationObject, Annotation annotate)
    {

        if (checkNullObject(validationObject))
        {
            return true;
        }
        
        int objectSize = 0;
        int minSize = ((Size) annotate).min();
        int maxSize = ((Size) annotate).max();
        if (validationObject != null)
        {
            if (String.class.isAssignableFrom(validationObject.getClass()))
            {
                objectSize = ((String) validationObject).length();

            }
            else if (Collection.class.isAssignableFrom(validationObject.getClass()))
            {
                
                objectSize = ((Collection) validationObject).size();
            }
            else if (Map.class.isAssignableFrom(validationObject.getClass()))
            {
                objectSize = ((Map) validationObject).size();
            }
            else if (ArrayList.class.isAssignableFrom(validationObject.getClass()))
            {

                objectSize = ((ArrayList) validationObject).size();

            }
            else
            {
                throwValidationException(((Size) annotate).message());

            }
        }
        return objectSize <= maxSize && objectSize >= minSize;

    }
548763
protected function parse($object)
    {
        if (! is_object($object)) {
            throw new ValidationException('ItemLink has to be an object, "' . gettype($object) . '" given.');
        }

        foreach (get_object_vars($object) as $name => $value) {
            $this->setLink($name, $value);
        }
    }
1261394
function checkObject (obj) {
  if (util.isArray(obj)) {
    obj.forEach(function (o) {
      checkObject(o);
    });
  }

  if (typeof obj === 'object' && obj !== null) {
    Object.keys(obj).forEach(function (k) {
      checkKey(k, obj[k]);
      checkObject(obj[k]);
    });
  }
}
216144
public void validate(Object o)
    {
        Matcher m = m_pattern.matcher(String.valueOf(o));
        if (!m.matches())
        {
            String message = m_propertyMetadata.getMessageSourceAccessor().getMessage(m_message, new Object[]{ m_propertyMetadata.getLabelName(), String.valueOf(o) });
            throw new ValidationException(message);
        }
    }
226727
public void validate()
    {
        Dimension size = desktopPane.getSize();
        size.height -= computeDesktopIconsSpace();
        layoutInternalFrames(size);
    }
45472
protected function validateAttribute($object, $attribute)
    {
        $value = $object->{$attribute};
        if ($this->isEmpty($value)) {
            $this->validateEmpty($object, $attribute);
            return;
        }
        if (!$this->validateValue($value)) {
            $this->addError($object, $attribute, $this->message);
        }
    }
1306677
private void addObjectIdentity(final Object object) {

        if (object == null) {
            _buffer.append("null");
        } else {
            _buffer.append(object.getClass().getName());
            _buffer.append("@");
            _buffer
                    .append(Integer
                            .toHexString(System.identityHashCode(object)));
        }

    }
1329506
private function isValidObjectInstance($object)
    {
        if (!is_null($this->classname) && !$this->isInstanceOrSubclassOf($object)) {
            return false;
        }

        return true;
    }