You are here

public function ExecutionContextInterface::addViolation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/ExecutionContextInterface.php \Symfony\Component\Validator\ExecutionContextInterface::addViolation()

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

Note: the parameters $invalidValue, $plural and $code are deprecated since version 2.5 and will be removed in 3.0.

Parameters

string $message The error message:

array $params The parameters substituted in the error message:

mixed $invalidValue The invalid, validated value:

int|null $plural The number to use to pluralize of the message:

int|null $code The violation code:

3 methods override ExecutionContextInterface::addViolation()
ExecutionContext::addViolation in vendor/symfony/validator/ExecutionContext.php
Adds a violation at the current node of the validation graph.
ExecutionContext::addViolation in vendor/symfony/validator/Context/ExecutionContext.php
Adds a violation at the current node of the validation graph.
ExecutionContext::addViolation in core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php
Adds a violation at the current node of the validation graph.

File

vendor/symfony/validator/ExecutionContextInterface.php, line 100

Class

ExecutionContextInterface
Stores the validator's state during validation.

Namespace

Symfony\Component\Validator

Code

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