function ExecutionContextInterface::addViolation
Adds a violation at the current node of the validation graph.
Parameters
string|\Stringable $message The error message as a string or a stringable object:
array $params The parameters substituted in the error message:
2 methods override ExecutionContextInterface::addViolation()
- ExecutionContext::addViolation in core/
lib/ Drupal/ Core/ Validation/ 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.
File
-
vendor/
symfony/ validator/ Context/ ExecutionContextInterface.php, line 70
Class
- ExecutionContextInterface
- The context of a validation run.
Namespace
Symfony\Component\Validator\ContextCode
public function addViolation(string $message, array $params = []) : void;