Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Validation] GroupSequence and validation groups should work together #20929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shinab opened this issue Dec 14, 2016 · 3 comments
Closed

[Validation] GroupSequence and validation groups should work together #20929

shinab opened this issue Dec 14, 2016 · 3 comments

Comments

@shinab
Copy link

shinab commented Dec 14, 2016

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2.0

Mixing GroupSequence and validation_groups should be working as it say in PR #10287

For now, GroupSequence alone is working as expected, but when validation_groups is added, validation does not fail on first error.

Forked version here : https://github.com/shinab/symfony-standard

Test scenario
Put a dot in the field and valid

With current implementation, validation should fail directly after group3, but it passed thougt group2 and group1 too.

If you comment validation_groups in MyEntityType, validation fail after group1 as expected.

@xabbuh
Copy link
Member

xabbuh commented Dec 17, 2016

@shinab Can you confirm that #20975 fixes your issue?

@shinab
Copy link
Author

shinab commented Dec 19, 2016

Yeap, it's all good to me 👍

fabpot added a commit that referenced this issue Dec 19, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] fix group sequence based validation

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20929
| License       | MIT
| Doc PR        |

Commits
-------

fb91f74 [Form] fix group sequence based validation
@fabpot fabpot closed this as completed Dec 19, 2016
@mindaugasvcs
Copy link
Contributor

mindaugasvcs commented Jul 28, 2024

How to use GroupSequence and validation groups together when I have mapped and not mapped form fields? I have to validate non mapped fields only when mapped fields pass validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants