From 3b9d8efc95a28d750fbc466d12f372bc8598f7f7 Mon Sep 17 00:00:00 2001 From: Samuele Lilli Date: Wed, 31 Oct 2018 16:57:08 +0100 Subject: [PATCH] Update ValidationListener.php This comment was misleading. It's true that no groups (ie.: `Default`) are setted into validation process but it's not clear from the comment. I suppose that is better to be more explicit about this process. BTW I'm still not sure if `FormValidator` reference is necessary as we can change it and we should remember to update this comment and this does not seems to fit. WDYT, is better to leave `FormValidator` out of this comment? For reference: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L46-L92 --- .../Extension/Validator/EventListener/ValidationListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php index 7b95f147d7e3..cbcc3e3e55d0 100644 --- a/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php @@ -51,7 +51,7 @@ public function validateForm(FormEvent $event) $form = $event->getForm(); if ($form->isRoot()) { - // Validate the form in group "Default" + // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator. foreach ($this->validator->validate($form) as $violation) { // Allow the "invalid" constraint to be put onto // non-synchronized forms