public function ExecutionContextInterface::addViolation

Adds a violation at the current node of the validation graph.

@api

Parameters

string $message The error message.:

array $params The parameters substituted in the error message.:

mixed $invalidValue The invalid, validated value.:

integer|null $pluralization The number to use to pluralize of the message.:

integer|null $code The violation code.:

1 method overrides ExecutionContextInterface::addViolation()
ExecutionContext::addViolation in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ExecutionContext.php
Adds a violation at the current node of the validation graph.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ExecutionContextInterface.php, line 99

Class

ExecutionContextInterface
Stores the validator's state during validation.

Namespace

Symfony\Component\Validator

Code

public function addViolation($message, array $params = array(), $invalidValue = null, $pluralization = null, $code = null);