Symfony\Component\Validator\ValidatorInterface::validateValue
Validates a value against a constraint or a list of constraints.
Signature
public function validateValue(mixed
$value,
[array
$constraints = null,
[array|null
$groups = null]] )
Parameters
$value
—
mixed
- The value to validate.
$constraints
—
array
- The constraint(s) to validate against.
$groups
—
object
- The validation groups to validate.
Returns
- ConstraintViolationListInterface
- A list of constraint violations. If the
list is empty, validation succeeded.