You are here

public function RecursiveValidator::validateValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Validator/RecursiveValidator.php \Symfony\Component\Validator\Validator\RecursiveValidator::validateValue()

Validates a value against a constraint or a list of constraints.

Parameters

mixed $value The value to validate.:

Constraint|Constraint[] $constraints The constraint(s) to validate against.:

array|null $groups The validation groups to validate.:

Return value

ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.

Overrides ValidatorInterface::validateValue

Deprecated

since version 2.5, to be removed in 3.0. Renamed to {@link Validator\ValidatorInterface::validate()} in Symfony 2.5.

File

vendor/symfony/validator/Validator/RecursiveValidator.php, line 162

Class

RecursiveValidator
Recursive implementation of {@link ValidatorInterface}.

Namespace

Symfony\Component\Validator\Validator

Code

public function validateValue($value, $constraints, $groups = null) {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\\Component\\Validator\\Validator\\ValidatorInterface::validate method instead.', E_USER_DEPRECATED);
  return $this
    ->validate($value, $constraints, $groups);
}