8000 minor #29043 Update ValidationListener.php (DonCallisto) · symfony/symfony@3096665 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 3096665

Browse files
committed
minor #29043 Update ValidationListener.php (DonCallisto)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29043). Discussion ---------- 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 | Q | A | ------------- | --- | Branch? | 3.4 (careful when merging) | Bug fix? | no | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 3b9d8ef Update ValidationListener.php
2 parents 4c8d04c + 3b9d8ef commit 3096665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function validateForm(FormEvent $event)
5151
$form = $event->getForm();
5252

5353
if ($form->isRoot()) {
54-
// Validate the form in group "Default"
54+
// Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator.
5555
foreach ($this->validator->validate($form) as $violation) {
5656
// Allow the "invalid" constraint to be put onto
5757
// non-synchronized forms

0 commit comments

Comments
 (0)
0