public function ExecutionContext::addViolationAt in Plug 7
Same name in this branch
- 7 lib/Symfony/validator/Symfony/Component/Validator/ExecutionContext.php \Symfony\Component\Validator\ExecutionContext::addViolationAt()
- 7 lib/Symfony/validator/Symfony/Component/Validator/Context/ExecutionContext.php \Symfony\Component\Validator\Context\ExecutionContext::addViolationAt()
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:
Overrides ExecutionContextInterface::addViolationAt
Deprecated
Deprecated since version 2.5, to be removed in Symfony 3.0. Use {@link Context\ExecutionContextInterface::buildViolation()} instead.
1 method overrides ExecutionContext::addViolationAt()
- LegacyExecutionContext::addViolationAt in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Context/ LegacyExecutionContext.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/ Context/ ExecutionContext.php, line 311
Class
- ExecutionContext
- The context used and created by {@link ExecutionContextFactory}.
Namespace
Symfony\Component\Validator\ContextCode
public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) {
throw new BadMethodCallException('addViolationAt() is not supported anymore as of Symfony 2.5. ' . 'Please use buildViolation() instead or enable the legacy mode.');
}