Creates a new constraint violation.
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.
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;
}