public function ValidatorInterface::validateValue

Validates a value against a constraint or a list of constraints.

@api

Parameters

mixed $value The value to validate.:

Constraint|Constraint[] $constraints The constraint(s) to validate against.:

array|null $groups The validation groups to validate.:

Return value

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

1 method overrides ValidatorInterface::validateValue()
Validator::validateValue in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Validator.php
Validates a value against a constraint or a list of constraints.

File

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

Class

ValidatorInterface
Validates values and graphs of objects and arrays.

Namespace

Symfony\Component\Validator

Code

public function validateValue($value, $constraints, $groups = null);