Skip to content

Correct documentation about embedded forms #4346

Closed
@webmozart

Description

@webmozart

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FormactionableClear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions