Validate the entity

@return void
763605
public function validate($value, $groups = null, $traverse = false, $deep = false)
    {
        $violations = $this->sValidator->validate($value, $groups, $traverse, $deep);

        if(count($violations) >= 1)
        {
            $this->hasFailed();

            foreach($violations as $key => $val)
            {
                $this->errors[] = $violations[$key]->getMessage();
            }
        }
        else
        {
            $this->hasPassed();
        }
    }
189306
public function validate() {
		parent::validate();

		if ($this->getName() === null) {
			throw new ValidationException("'name' can't be null", 'name', $this);
		}
		if ($this->getType() === null) {
			throw new ValidationException("'type' can't be null", 'type', $this);
		}
	}
726387
protected function performValidation()
    {
        $this->requireProperties(['name', 'in']);
        if ($this->in === 'path') {
            $this->requireProperties(['required']);
            if (!$this->required) {
                $this->addError("Parameter 'required' must be true for 'in': 'path'.");
            }
        }
        if (!empty($this->content) && !empty($this->schema)) {
            $this->addError("A Parameter Object MUST contain either a schema property, or a content property, but not both. ");
        }
    }
1156491
public function validate() {
        if ($this->file->validate() === false) {
            $this->errors = $this->file->getErrors();
            return false;
        }

        return true;
    }
184296
protected function validateModel()
    {
        if (!is_string($this->model)) {
            $baseName = $this->getControllerBaseName();
            $this->findModelClass($baseName);
        }
    }
19026
public function validate(Message $message)
    {
        /** @var Validator $validator */
        foreach ($this->validators as $validator) {
            $validator->validate($message);
        }
    }
666898
public function validate($value, Constraint $constraint)
    {
        /** @var EntityExists $constraint */
        if ($constraint->validate($value)) {
            $this->context->addViolation(
                $constraint->message,
                [
                    '{{ type }}' => $constraint->entityClass,
                    '{{ value }}' => $value,
                ]
            );
        }
    }
481405
protected function validate()
	{
		$this->loadXML();
		$this->id = $this->xml->firstChild->nextSibling->getAttribute('id');
		$this->detectAutoValidate();

		$this->validateInputs($this->xml->firstChild->nextSibling);
	}
969254
public function validate($entity)
    {
        $errors = $this->validator->validate($entity);

        $dataErrors = [];

        /** @var ConstraintViolation $error */
        foreach ($errors as $error) {
            if (!isset($dataErrors[$error->getPropertyPath()])) {
                $dataErrors[$error->getPropertyPath()] = [];
            }

            $dataErrors[$error->getPropertyPath()][] = $error->getMessage();
        }

        return $dataErrors;
    }
710712
protected function validate()
    {
        $this->validator
            = substr($this->account, 2, 2) == 99
            ? $this->validator1
            : $this->validatorChain;
    }
327055
protected function validate()
    {
        $valid = parent::validate();
        foreach ($this as $child) {
            $valid = $child->validate() && $valid;
        }
        return $valid;
    }
119741
public function validate()
    {
        $setToBreak = false;

        foreach ($this->_validations as $v) {
            foreach ($v['fields'] as $field) {
                if (isset($this->_skips[$field])) {
                    if ($this->_skips[$field] === self::SKIP_ALL) {
                        break 2;
                    }

                    if ($this->_skips[$field] === self::SKIP_ONE) {
                        break;
                    }
                }

                [$values, $multiple] = $this->getPart($this->_fields, \explode('.', $field));

                // Don't validate if the field is not required and the value is empty
                if (null !== $values && $this->hasRule('optional', $field)) {
                    //Continue with execution below if statement
                } elseif (
                    $v['rule'] !== 'accepted' &&
                    $v['rule'] !== 'required' && !$this->hasRule('required', $field) &&
                    (null === $values || $values === '' || ($multiple && \count($values) === 0))
                ) {
                    continue;
                }

                // Callback is user-specified or assumed method on class
                $errors = $this->getRules();
                if (isset($errors[$v['rule']])) {
                    $callback = $errors[$v['rule']];
                } else {
                    $callback = [$this, 'validate' . \ucfirst($v['rule'])];
                }

                if (!$multiple) {
                    $values = [$values];
                }

                $result = true;
                foreach ($values as $value) {
                    $result = $result && $callback($field, $value, $v['params'], $this->_fields);
                }

                if (!$result) {
                    $this->error($field, $v['message'], $v['params']);
                    if ($this->stopOnFirstFail) {
                        $setToBreak = true;
                        break;
                    }
                    $this->_skips[$field] = $v['skip'];
                }
            }

            if ($setToBreak) {
                break;
            }
        }

        return \count($this->errors()) === 0;
    }
910636
public function validate()
	{
		$validity = Rules::validate($this->attributes, $this->getRules());

		if ($validity === true)
		{
			return true;
		}

		$this->setErrors($validity);
		return false;
	}
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;
    }
235776
protected function validation()
    {
        if (null === $this->validation) {
            $this->validation = new ValidationBuilder($this);
        }

        return $this->validation;
    }
719404
public function validate()
	{
		foreach ($this->validators as $validate)
		{
			$definition = $this->klass->getStaticPropertyValue($validate);
			$this->$validate(wrap_strings_in_arrays($definition));
		}

		$model_reflection = Reflections::instance()->get($this->model);

		if ($model_reflection->hasMethod('validate') && $model_reflection->getMethod('validate')->isPublic())
			$this->model->validate();

		$this->record->clear_model();
		return $this->record;
	}
915663
protected function validate()
    {
        if (!empty($this->errors)) {
            // already validated
            return;
        }

        $this->errors = [];

        foreach ($this->rules as $field => $rules) {

            $value = $this->getValue($field);

            foreach ($this->provider->getRules($rules) as $rule) {
                if ($rule->ignoreEmpty($value) && empty($rule->hasConditions())) {
                    continue;
                }

                foreach ($rule->getConditions() as $condition) {
                    if (!$condition->isMet($this, $field, $value)) {
                        // condition is not met, skipping validation
                        continue 2;
                    }
                }

                if (!$rule->validate($this, $field, $value)) {
                    // got error, jump to next field
                    $this->errors[$field] = $rule->getMessage($field, $value);
                    break;
                }
            }
        }
    }