You are here

public function ValidatorInterface::validate in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/ValidatorInterface.php \Symfony\Component\Validator\ValidatorInterface::validate()
  2. 8 vendor/symfony/validator/Validator/ValidatorInterface.php \Symfony\Component\Validator\Validator\ValidatorInterface::validate()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/ValidatorInterface.php \Symfony\Component\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.

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 vendor/symfony/validator/Validator.php
Validates a value.

File

vendor/symfony/validator/ValidatorInterface.php, line 42

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);