You are here

public function ValidatorInterface::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.

Deprecated

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

2 methods override ValidatorInterface::validateValue()
LegacyValidator::validateValue in lib/Symfony/validator/Symfony/Component/Validator/Validator/LegacyValidator.php
Validates a value against a constraint or a list of constraints.
Validator::validateValue in lib/Symfony/validator/Symfony/Component/Validator/Validator.php
Validates a value against a constraint or a list of constraints.

File

lib/Symfony/validator/Symfony/Component/Validator/ValidatorInterface.php, line 99

Class

ValidatorInterface
Validates values and graphs of objects and arrays.

Namespace

Symfony\Component\Validator

Code

public function validateValue($value, $constraints, $groups = null);