public function ContextualValidatorInterface::validate in Plug 7
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
1 method overrides ContextualValidatorInterface::validate()
- RecursiveContextualValidator::validate in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Validator/ RecursiveContextualValidator.php - Validates a value against a constraint or a list of constraints.
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Validator/ ContextualValidatorInterface.php, line 52
Class
- ContextualValidatorInterface
- A validator in a specific execution context.
Namespace
Symfony\Component\Validator\ValidatorCode
public function validate($value, $constraints = null, $groups = null);