function ConstraintViolation::__construct
Creates a new constraint violation.
Parameters
string|\Stringable $message The violation message as a string or a stringable object:
string|null $messageTemplate The raw violation message:
array $parameters The parameters to substitute in the: raw violation message
mixed $root The value originally passed to the: validator
string|null $propertyPath The property path from the root: value to the invalid value
mixed $invalidValue The invalid value that caused this: violation
int|null $plural The number for determining the plural: form when translating the message
string|null $code The error code of the violation:
Constraint|null $constraint The constraint whose validation: caused the violation
mixed $cause The cause of the violation:
File
-
vendor/
symfony/ validator/ ConstraintViolation.php, line 41
Class
- ConstraintViolation
- Default implementation of {@ConstraintViolationInterface}.
Namespace
Symfony\Component\ValidatorCode
public function __construct(string|\Stringable $message, ?string $messageTemplate, array $parameters, mixed $root, ?string $propertyPath, mixed $invalidValue, ?int $plural = null, ?string $code = null, ?Constraint $constraint = null, mixed $cause = null) {
}