Skip to content

Unmapped forms are not validated #11268

@stof

Description

@stof

This is an issue being there since 2.1.

The FormValidator runs the validation of the underlying object graph in 2 cases:

  • on the root form
  • in case all parents have cascade_validation set to true

This means that when you have a subform with mapped set to false, the only way to have its object graph validation is to enable cascade_validation on all parents of the unmapped field, which will lead to duplicate validation of the object graph of the parent if it uses @Assert\Valid() properly.

As unmapped forms define a new object graph, I think it would make sense to run the validation on them as well.

/cc @webmozart

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy