Validator deprecated::validate()

ConstraintViolationListInterface validate(mixed $value, array|null $groups = null, bool $traverse = false, bool $deep = false)

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.

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.
doc_Symfony
2016-10-28 06:36:36
Comments
Leave a Comment

Please login to continue.