ContextualValidatorInterface::validate()

ContextualValidatorInterface validate(mixed $value, Constraint|Constraint[] $constraints = null, array|null $groups = null)

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

If no constraint is passed, the constraint {@link \Symfony\Component\Validator\Constraints\Valid} is assumed.

Parameters

mixed $value The value to validate
Constraint|Constraint[] $constraints The constraint(s) to validate against
array|null $groups The validation groups to validate. If none is given, "Default" is assumed

Return Value

ContextualValidatorInterface This validator
doc_Symfony
2016-10-28 06:12:13
Comments
Leave a Comment

Please login to continue.