Validates a value.
The accepted values depend on the {@link MetadataFactoryInterface} implementation.
@api
mixed $value The value to validate:
array|null $groups The validation groups to validate.:
Boolean $traverse Whether to traverse the value if it is traversable.:
Boolean $deep Whether to traverse nested traversable values recursively.:
ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.
public function validate($value, $groups = null, $traverse = false, $deep = false);