Validate the class instance.

@return void
322462
public function validate()
	{
		$instance = $this->getValidatorInstance();

		if ( !$this->passesAuthorization() )
		{
			$this->failedAuthorization();
		}
		elseif ( !$instance->passes() )
		{
			$this->failedValidation( $instance );
		}
	}
711362
public function validate(){
		
		if(empty($this->_validators)){
			$this->_valid = true;
			return true;
		}
		
		$valid = false;
		$newValue = null;
		foreach ($this->_validators as $validator) {
			try{
				$newGeneratedValue = $validator->valideteValue($this->getVal());
				if(!$valid)
					$newValue = $newGeneratedValue;
				$valid = true;
			} catch ( \OWeb\types\UserException $ex){
				$valid = $valid || false;
				$this->_errMessages[] = $ex->getMessage();
				$this->_errDesriptions[] = $ex->getUserDescription();
			}
		}
		
		if($valid)
			$this->_trueVal = $newValue;
		else 
			$this->_trueVal = null;
		
		$this->_valid = $valid;
		
		return $valid;
	}
327055
protected function validate()
    {
        $valid = parent::validate();
        foreach ($this as $child) {
            $valid = $child->validate() && $valid;
        }
        return $valid;
    }
85546
public function validate() {
		parent::validate();

		if ($this->getEntity() === null) {
			throw new ValidationException("'entity' can't be null", 'entity', $this);
		}
		if ($this->getEntityStates() === null) {
			throw new ValidationException("'entityStates' can't be null", 'entityStates', $this);
		}
		if ($this->getUrl() === null) {
			throw new ValidationException("'url' can't be null", 'url', $this);
		}
	}
330386
public function validate(): void
    {
        $this->validateRootFilter();
        $this->validateRelations();
        $this->validateSorts();
        $this->validateOffset();
        $this->validateLimit();
        $this->validateFields();
    }
27359
private function validate()
    {
        if ($this->hasValidated) {
            return;
        }

        $this->checkDepth();

        foreach ($this->schema as $rule => $parameter) {
            $this->currentKeyword   = $rule;
            $this->currentParameter = $parameter;
            $this->mergeErrors($this->validateRule($rule, $parameter));
            $this->currentKeyword = $this->currentParameter = null;
        }

        $this->hasValidated = true;
    }
52668
public function validate() {
        $validated = TRUE;

        foreach($this->getFormElements() as $name => $child) {
            $validated &= $child->validate();
        }

        $validated &= $this->fireEvent("Form\onValidate", [ $this->value, $this ], TRUE, FALSE);

        return (bool)$validated;
    }
259141
public function validate()
    {
        $this->debug->groupCollapsed(__METHOD__, $this->attribs['name']);
        $this->props['isValid'] = true;
        $this->classRemove($this->props['attribsContainer'], 'has-error');
        $attribs = $this->attribs;
        if (\in_array($attribs['type'], array('checkbox','radio','select'))) {  // these types use the 'options' array
            $this->validateCrs();
        } elseif (\in_array($attribs['type'], array('submit','reset','image'))) {
            $this->debug->log('not checking');
        } elseif (!empty($this->props['newPage'])) {
            $this->debug->log('not checking newPage');
        } elseif (\in_array($attribs['type'], array('file'))) {
            $this->debug->log($attribs['name'].' is a file type');
            if ($this->isRequired() && empty($attribs['disabled']) && empty($attribs['value'])) {
                $this->flag();
            }
        } elseif ($this->isRequired() || $this->props['flagNonReqInvalid']) {
            if (!empty($attribs['placeholder']) && $attribs['value'] === $attribs['placeholder']) {
                $this->debug->log('value == placeholder');
                $attribs['value'] = null;
            }
            $this->validateFromAttributes();
        }
        if ($this->props['isValid']) {
            $isValid = $this->doValidate();
            // validate callback may call flag() directly
            if ($this->props['isValid'] && !$isValid) {
                $this->flag();
            }
        }
        $this->debug->groupEnd();
        return $this->props['isValid'];
    }
1294612
public function validate()
    {
        $order = $this->getInfoInstance()->getOrder();

        if ($order) {
            // Force to generate REF from Order ID.
            $this->assignData(null);
        }

        return parent::validate();
    }
821018
public function validate()
	{
		$this->errors->set();

		foreach ($this->rules as $key => $rule) {
			list ($fields, $type, $options) = $this->parseRule($rule);

			if (!$validator = $this->validators->$type) {
				$validator = $this->create($type);
				$this->validators->$type = $validator;
			}

			foreach ($fields as $key => $field) {
				$value = $this->dataSet->$field;

				if (!$validator->validate($value, $options)) {
					$this->addErrors($field, $validator->getErrors());
				}
			}
		}

		return !$this->hasErrors();
	}
1271088
public function validate()
    {
        foreach ($this as $element) {

            if (
                $element instanceof ValidationAwareInterface ||
                $element instanceof ContainerInterface
            ) {
                $element->validate();
            }
        }
        return $this;
    }
154441
def validate(self, instance):
        """"""
        errors = {}
        self._validate_instance(instance, errors)

        if len(errors) > 0:
            raise ValidationException(errors)
746424
public function validate(): bool
    {
        $valid = true;
        $this->_errors = [];
        foreach ($this->_paths as $key => $path) {
            if ($path === null) {
                continue;
            }
            if (!$path->validate()) {
                $valid = false;
            }
            if (strpos($key, '/') !== 0) {
                $this->_errors[] = "Path must begin with /: $key";
            }
        }
        return $valid && empty($this->_errors);
    }
1015991
protected function validate()
    {
        if (!$this->validator instanceof ValidatorInterface) {
            return;
        }

        $valid = true;
        if ($this->getEntityContainerMap()->count() > 0) {
            $entityContainers = $this->getEntityContainerMap()->getAll();

            $this->logger->debug('start form entity valiation', array('name' => $this->getName()));

            /**
             * @var $entityContainer    \Naucon\Form\Mapper\EntityContainerInterface
             */
            foreach ($entityContainers as $entityContainer) {
                if ($entityContainer->hasValidate()) {
                    $this->logger->debug('invoke form prevalidator hook', array('name' => $this->getName(), 'entity' => $entityContainer->getName()));
                    // prevalidation hook
                    $entityContainer->invokeHook('prevalidatorHook');

                    $violations = $this->validator->validate($entityContainer->getEntity(), null, $this->configuration->get('validation_groups'));
                    if (is_array($violations) && count($violations)) {
                        // TODO set FormValidations to $entityContainer
                        /**
                         * @var \Naucon\Form\Validator\ViolationInterface $violation
                         */
                        $violationsDump = array();
                        foreach ($violations as $violation) {
                            $violationsDump[$violation->getName()] = $violation->getMessage();
                            $entityContainer->setError($violation->getName(), new FormError($violation->getName(), $violation->getMessage()));
                        }
                        $valid = false;

                        $this->logger->debug('form entity violations', array('name' => $this->getName(), 'entity' => $entityContainer->getName(), 'violations' => $violationsDump));
                    }

                    // postvalidation hook
                    $this->logger->debug('invoke form postvalidator hook', array('name' => $this->getName(), 'entity' => $entityContainer->getName()));
                    $entityContainer->invokeHook('postvalidatorHook');

                    if ($entityContainer->hasErrors()) {
                        $valid = false;
                    }
                }
            }
        }

        if ($valid) {
            $this->logger->debug('finished form entity valiation successful', array('name' => $this->getName()));
        } else {
            $this->logger->debug('finished form entity valiation failed', array('name' => $this->getName()));
        }
        $this->setValid($valid);
    }
1044063
public function isValid() {
        if ($this->isValid === null) $this->isValid = $this->validate();
        return $this->isValid;
    }
754459
public function validate()
    {
        $this->shouldValidate = false;

        if (parent::validates()) {
            $this->success = true;
        } else {
            $this->fail();
        }

        return $this;
    }
955264
public function validate()
    {
        # addValues adds validation errors for unknown values
        $errs = count($this->errors);

        $dataKey = constant(get_called_class()."::EVENT_DATA_KEY");

        if ($this->beforeValidate() !== true) {
            return false;
        }
        foreach ($this->fields as $field) {
            if ($field->validate($this) === false) {
                foreach ($field->getErrors() as $error) {
                    $this->addError($error);
                    $errs++;
                }
            }
        }
        return (
            $errs > 0 ||
            $this->afterValidate() !== true ||
            count($this->errors) > 0
        ) ? false : true;
    }