Symfony\Component\Validator\ValidatorInterface::validate
Validates a value.
The accepted values depend on the implementation.
Signature
public function validate(mixed
$value,
[array|null
$groups = null,
[Boolean
$traverse = false,
[Boolean
$deep = false]]] )
Parameters
$value
— mixed- The value to validate
$groups
— object- The validation groups to validate.
$traverse
— object- Whether to traverse the value if it is traversable.
$deep
— object- Whether to traverse nested traversable values recursively.
Returns
- ConstraintViolationListInterface
- A list of constraint violations. If the
list is empty, validation succeeded.