8000 Updated information about handling validation of embedded forms to Valid... by peterrehm · Pull Request #4348 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Updated information about handling validation of embedded forms to Valid... #4348

wants to merge 1 commit into from

Conversation

peterrehm
Copy link
Contributor
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

@xabbuh
Copy l 8000 ink
Member
xabbuh commented Oct 20, 2014

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?

@peterrehm
Copy link
Contributor Author

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

@xabbuh
Copy link
Member
xabbuh commented Oct 20, 2014

Thanks for the new PR. However, doesn't it make sense to mention in the cascade_validation section that in most cases, you should better use the Valid constraint?

@peterrehm
Copy link
Contributor Author

It is mentioned? "Instead, use the Valid constraint in your model to cascade validation"

@xabbuh
Copy link
Member
xabbuh commented Oct 20, 2014

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?

@peterrehm
Copy link
Contributor Author

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.
Copy link
Member

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?

Copy link
Contributor Author

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>`

Copy link
Member

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 :)

@weaverryan
Copy link
Member

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!

@peterrehm
Copy link
Contributor Author

Just updated it as suggested.

@weaverryan
Copy link
Member

Thanks Peter!

weaverryan added a commit that referenced this pull request Oct 29, 2014
…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
@weaverryan weaverryan closed this Oct 29, 2014
@peterrehm peterrehm deleted the embedded-forms branch November 2, 2014 19:30
weaverryan added a commit that referenced this pull request Jun 19, 2015
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0