public function ValidatorInterface::validate

Validates a value.

The accepted values depend on the {@link MetadataFactoryInterface} implementation.

@api

Parameters

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.:

Return value

ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.

1 method overrides ValidatorInterface::validate()
Validator::validate in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Validator.php
Validates a value.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ValidatorInterface.php, line 41

Class

ValidatorInterface
Validates values and graphs of objects and arrays.

Namespace

Symfony\Component\Validator

Code

public function validate($value, $groups = null, $traverse = false, $deep = false);