You are here

public function ExecutionContextInterface::addViolationAt in Zircon Profile 8

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

Adds a violation at the validation graph node with the given property path relative to the current property path.

Parameters

string $subPath The relative property path for the violation:

string $message The error message:

array $parameters 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:

Deprecated

since version 2.5, to be removed in 3.0. Use {@link Context\ExecutionContextInterface::buildViolation()} instead.

3 methods override ExecutionContextInterface::addViolationAt()
ExecutionContext::addViolationAt in vendor/symfony/validator/ExecutionContext.php
Adds a violation at the validation graph node with the given property path relative to the current property path.
ExecutionContext::addViolationAt in vendor/symfony/validator/Context/ExecutionContext.php
Adds a violation at the validation graph node with the given property path relative to the current property path.
ExecutionContext::addViolationAt in core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php
Adds a violation at the validation graph node with the given property path relative to the current property path.

File

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

Class

ExecutionContextInterface
Stores the validator's state during validation.

Namespace

Symfony\Component\Validator

Code

public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null);