Skip to content

Commit 3c8cd70

Browse files
committed
[Form] Removed legacy check in ValidationListener
1 parent 03ed019 commit 3c8cd70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Extension/Validator/EventListener/ValidationListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public function validateForm(FormEvent $event)
5555
foreach ($this->validator->validate($form) as $violation) {
5656
// Allow the "invalid" constraint to be put onto
5757
// non-synchronized forms
58-
// ConstraintViolation::getConstraint() must not expect to provide a constraint as long as Symfony\Component\Validator\ExecutionContext exists (before 3.0)
59-
$allowNonSynchronized = (null === $violation->getConstraint() || $violation->getConstraint() instanceof Form) && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
58+
$allowNonSynchronized = $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
6059

6160
$this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized);
6261
}

0 commit comments

Comments
 (0)