ViolationMapper

class ViolationMapper implements ViolationMapperInterface

Methods

mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false)

Maps a constraint violation to a form in the form tree under the given form.

Details

mapViolation(ConstraintViolation $violation, FormInterface $form, bool $allowNonSynchronized = false)

Maps a constraint violation to a form in the form tree under the given form.

Parameters

ConstraintViolation $violation The violation to map
FormInterface $form the root form of the tree to map it to
bool $allowNonSynchronized whether to allow mapping to non-synchronized forms