You are here

public function ExecutionContextInterface::addViolationAt in Plug 7

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

@api

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

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

2 methods override ExecutionContextInterface::addViolationAt()
ExecutionContext::addViolationAt in lib/Symfony/validator/Symfony/Component/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 lib/Symfony/validator/Symfony/Component/Validator/Context/ExecutionContext.php
Adds a violation at the validation graph node with the given property path relative to the current property path.

File

lib/Symfony/validator/Symfony/Component/Validator/ExecutionContextInterface.php, line 123

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