Skip to content
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

Correct documentation about embedded forms #4346

Closed
webmozart opened this issue Oct 20, 2014 · 4 comments
Closed

Correct documentation about embedded forms #4346

webmozart opened this issue Oct 20, 2014 · 4 comments
Labels
actionable Clear and specific issues ready for anyone to take them. Form good first issue Ideal for your first contribution! (some Symfony experience may be required)

Comments

@webmozart
Copy link
Contributor

Currently, the documentation about embedded forms is incorrect. The documentation states that the "cascade_validation" option should be used to enable validation of the embedded form. This is wrong. Instead, one should set the Valid constraint on the respective property in the model.

The "cascade_validation" option was introduced to solve a very rare use case, namely when embedded forms have the "mapped" option set to false. This use case can also be solved using the Valid constraint as of 2.5. Thus "cascade_validation" will be deprecated in 2.6.

More information in the deprecation ticket: symfony/symfony#12237

@wouterj wouterj added actionable Clear and specific issues ready for anyone to take them. good first issue Ideal for your first contribution! (some Symfony experience may be required) Form labels Oct 20, 2014
@peterrehm
Copy link
Contributor

Just submitted the PR.

@webmozart
Copy link
Contributor Author

Wow, that was quick! Thanks @peterrehm :)

@peterrehm
Copy link
Contributor

No problem. That was an easy pick :)

weaverryan added a commit that referenced this issue 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
@wouterj
Copy link
Member

wouterj commented Dec 17, 2014

Fixed already by #4348

@wouterj wouterj closed this as completed Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. Form good first issue Ideal for your first contribution! (some Symfony experience may be required)
Projects
None yet
Development

No branches or pull requests

3 participants