private function ExecutionContext::executeConstraintValidators

Executes the validators of the given constraints for the given value.

Parameters

mixed $value The value to validate.:

Constraint[] $constraints The constraints to match against.:

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ExecutionContext.php, line 271

Class

ExecutionContext
Default implementation of {@link ExecutionContextInterface}.

Namespace

Symfony\Component\Validator

Code

private function executeConstraintValidators($value, array $constraints) {
  foreach ($constraints as $constraint) {
    $validator = $this->globalContext
      ->getValidatorFactory()
      ->getInstance($constraint);
    $validator
      ->initialize($this);
    $validator
      ->validate($value, $constraint);
  }
}