You are here

public function LegacyValidator::validateValue in Plug 7

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

@api

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

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

File

lib/Symfony/validator/Symfony/Component/Validator/Validator/LegacyValidator.php, line 60

Class

LegacyValidator
A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+.

Namespace

Symfony\Component\Validator\Validator

Code

public function validateValue($value, $constraints, $groups = null) {
  return parent::validate($value, $constraints, $groups);
}