public function ValidatorInterface::validate in Plug 7
Same name in this branch
- 7 lib/Symfony/validator/Symfony/Component/Validator/ValidatorInterface.php \Symfony\Component\Validator\ValidatorInterface::validate()
- 7 lib/Symfony/validator/Symfony/Component/Validator/Validator/ValidatorInterface.php \Symfony\Component\Validator\Validator\ValidatorInterface::validate()
Validates a value.
The accepted values depend on the {@link MetadataFactoryInterface} implementation.
The signature changed with Symfony 2.5 (see {@link Validator\ValidatorInterface::validate()}. This signature will be disabled in Symfony 3.0.
@api
Parameters
mixed $value The value to validate:
array|null $groups The validation groups to validate.:
bool $traverse Whether to traverse the value if it is traversable.:
bool $deep Whether to traverse nested traversable values recursively.:
Return value
ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.
1 method overrides ValidatorInterface::validate()
- Validator::validate in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Validator.php - Validates a value.
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ ValidatorInterface.php, line 46
Class
- ValidatorInterface
- Validates values and graphs of objects and arrays.
Namespace
Symfony\Component\ValidatorCode
public function validate($value, $groups = null, $traverse = false, $deep = false);