-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Made validation of form children configurable #3128
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
[Form] Made validation of form children configurable #3128
Conversation
…"cascade_validation" to `true` if you need it.
👍 |
Commits ------- 0c70a41 [Form] Made validation of form children configurable. Set the option "cascade_validation" to `true` if you need it. Discussion ---------- [Form] Made validation of form children configurable Bug fix: yes Feature addition: yes Backwards compatibility break: yes Symfony2 tests pass: yes Fixes the following tickets: #797 Todo: adapt documentation  Child forms now aren't validated anymore by default. This is not a problem as long as @Valid constraints are properly put in your model. If you want to enable cascading validation, for example when there is no connection between the parent and the child model, you can set the option "cascade_validation" in the parent form to true. This change is not backwards compatible, but from my estimation the break should not affect many applications. --------------------------------------------------------------------------- by kriswallsmith at 2012-01-16T19:59:25Z :+1:
merged, thanks. Don't forget to update the CHANGELOG and the UPGRADE file as well. I've done the former here: 172300e |
Using |
@craue Could you open a ticket with more details please? |
@bschussek: See #3219. |
Hi, one problem I have found is that using @Valid doesn't work when using validation_groups in the child form options. Is this considered a problem or is putting validation groups in child forms simply not done ? |
@guillaumesmo: You are right this doesn't work and there should be ticket opened about that, however I'm unable to find it. |
keep me informed if you do it, otherwise i'll post a ticket in a few hours |
OK, issue posted here: #9650 |
Bug fix: yes
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #797
Todo: adapt documentation
Child forms now aren't validated anymore by default. This is not a problem as long as @Valid constraints are properly put in your model. If you want to enable cascading validation, for example when there is no connection between the parent and the child model, you can set the option "cascade_validation" in the parent form to true.
This change is not backwards compatible, but from my estimation the break should not affect many applications.