-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Updated in 8000 formation about handling validation of embedded forms to Valid... #4348
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
Conversation
Wow, thanks for taking this up so quickly @peterrehm. What do you think about also adding some note to this option in the form reference? |
No problem. I have added this depreciation note into a separate PR since this one can be merged immediately, the other one only after symfony/symfony#12237 gots merged. /cc @webmozart |
Thanks for the new PR. However, doesn't it make sense to mention in the |
It is mentioned? "Instead, use the |
Hm, yeah, but it will then only be shown in the 2.6 version of the documentation. Though, as far as I understand the issue, these implications are also true for older versions, aren't they? |
I added the recommendation to both PR's so it will appear in all versions. It was mentioned before but not recommended so I thought best would be to have it in a tip section. |
Instead of using this option, it is recommended that you use the ``Valid`` | ||
constraint in your model to force validation on a child object stored on | ||
a property. This cascades only the validation but not the use of the | ||
``validation_group`` option on child forms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a link to the section in the book chapter that you just added so people can see an example. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there the possibility to link to a specified section or only as follows?
:doc:`Forms </book/forms>`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, you can use :ref:
to point to a specific "spot" (and you add a little _foo-bar-baz
in the target spot). We have a few examples lying around in the docs - let me know if I'm being too vague :)
I added one small suggestion. But after that, this has a 👍 from me! Furthermore, I'm very happy to have this clarified - iirc, the cascading worked differently in 2.0, so there was some "baggage" in understanding how this worked and documenting it absolutely correctly. Thanks! |
Just updated it as suggested. |
Thanks Peter! |
…ed forms to Valid... (peterrehm) This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4348). Discussion ---------- Updated information about handling validation of embedded forms to Valid... | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #4346 Applied Valid constraint instead of the cascade_validation option since this option is supposed to be deprecated with symfony/symfony#12237 Commits ------- b699731 Updated information about handling validation of embedded forms to Valid constraint
…n constraint (peterrehm) This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #4354). Discussion ---------- [WCM] Added depreciation note for the cascade_validation constraint | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.8 | Fixed tickets | - This PR was based on symfony/symfony#12237 and has been updated based as symfony/symfony#15019. #4348 Commits ------- 22a87b5 Added depreciation note for the cascade_validation constraint and updated position of depreciation notes
Applied Valid constraint instead of the cascade_validation option since this option is supposed to be deprecated with symfony/symfony#12237