ConstraintViolationBuilderInterface
interface ConstraintViolationBuilderInterface
Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.
Use the various methods on this interface to configure the built violation. Finally, call {@link addViolation()} to add the violation to the current execution context.
Methods
Stores the property path at which the violation should be generated.
Sets a parameter to be inserted into the violation message.
Sets all parameters to be inserted into the violation message.
Sets the translation domain which should be used for translating the violation message.
Sets the invalid value that caused this violation.
Sets the number which determines how the plural form of the violation message is chosen when it is translated.
Sets the violation code.
Sets the cause of the violation.
Adds the violation to the current execution context.
Details
at line line 38
ConstraintViolationBuilderInterface
atPath(string $path)
Stores the property path at which the violation should be generated.
The passed path will be appended to the current property path of the execution context.
at line line 48
ConstraintViolationBuilderInterface
setParameter(string $key, string $value)
Sets a parameter to be inserted into the violation message.
at line line 59
ConstraintViolationBuilderInterface
setParameters(array $parameters)
Sets all parameters to be inserted into the violation message.
at line line 71
ConstraintViolationBuilderInterface
setTranslationDomain(string $translationDomain)
Sets the translation domain which should be used for translating the violation message.
at line line 80
ConstraintViolationBuilderInterface
setInvalidValue(mixed $invalidValue)
Sets the invalid value that caused this violation.
at line line 92
ConstraintViolationBuilderInterface
setPlural(int $number)
Sets the number which determines how the plural form of the violation message is chosen when it is translated.
at line line 101
ConstraintViolationBuilderInterface
setCode(string|null $code)
Sets the violation code.
at line line 110
ConstraintViolationBuilderInterface
setCause(mixed $cause)
Sets the cause of the violation.
at line line 115
addViolation()
Adds the violation to the current execution context.