Skip to content

[Form] Include Form Error Normalizer #27428

@mnavarrocarter

Description

@mnavarrocarter

Description
I work a lot with Symfony Forms and it's awesome, but sometimes I need to normalize my Symfony Form Errors in a good way, so I can encode them in some kind of output. So I always end up copy/pasting the FormErrorNormalizer in the FOS Rest.

There's a good case for including this normalizer as part of the form component, since it's basically a normalizer made for a class that is only present in this package. That way, we don't have to require an extra package or copy paste code from somewhere else.

So, what about a Compiler pass for the form component that registers the normalizer when serializer is active in a project? Maybe we could even have two flavors, one just with the serializer dependency, and another with translation support.

Any comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureFormGood first issueIdeal for your first contribution! (some Symfony experience may be required)Serializer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions