ConstraintViolationBuilderInterface

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

登录查看完整内容
$this atPath(string $path)

Stores the property path at which the violation should be generated.

$this setParameter(string $key, string $value)

Sets a parameter to be inserted into the violation message.

$this setParameters(array $parameters)

Sets all parameters to be inserted into the violation message.