public function ConstraintViolation::__construct

Creates a new constraint violation.

Parameters

string $message The violation message.:

string $messageTemplate The raw violation message.:

array $messageParameters The parameters to substitute: in the raw message.

mixed $root The value originally passed: to the validator.

string $propertyPath The property path from the: root value to the invalid value.

mixed $invalidValue The invalid value causing the: violation.

integer|null $messagePluralization The pluralization parameter.:

mixed $code The error code of the: violation, if any.

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ConstraintViolation.php, line 79

Class

ConstraintViolation
Default implementation of {@ConstraintViolationInterface}.

Namespace

Symfony\Component\Validator

Code

public function __construct($message, $messageTemplate, array $messageParameters, $root, $propertyPath, $invalidValue, $messagePluralization = null, $code = null) {
  $this->message = $message;
  $this->messageTemplate = $messageTemplate;
  $this->messageParameters = $messageParameters;
  $this->messagePluralization = $messagePluralization;
  $this->root = $root;
  $this->propertyPath = $propertyPath;
  $this->invalidValue = $invalidValue;
  $this->code = $code;
}