[Form] Removed legacy check in ValidationListener
This commit is contained in:
parent
5da141b8d0
commit
e479e51f7c
@ -55,8 +55,7 @@ class ValidationListener implements EventSubscriberInterface
|
|||||||
foreach ($this->validator->validate($form) as $violation) {
|
foreach ($this->validator->validate($form) as $violation) {
|
||||||
// Allow the "invalid" constraint to be put onto
|
// Allow the "invalid" constraint to be put onto
|
||||||
// non-synchronized forms
|
// non-synchronized forms
|
||||||
// ConstraintViolation::getConstraint() must not expect to provide a constraint as long as Symfony\Component\Validator\ExecutionContext exists (before 3.0)
|
$allowNonSynchronized = $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
|
||||||
$allowNonSynchronized = (null === $violation->getConstraint() || $violation->getConstraint() instanceof Form) && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
|
|
||||||
|
|
||||||
$this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized);
|
$this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user