Skip to content

[Forms] Bootstrap Theme: Explain that form_errors() is harmful #13648

Closed
@ThomasLandauer

Description

@ThomasLandauer

Since form_label() now also renders the validation error messages, calling form_errors() results in having the error messages twice. Should I come up with a PR for https://symfony.com/doc/current/form/bootstrap4.html#labels-and-errors explaining that calling form_errors() isn't a good idea at all?

My only question: Is this true for all fields or are there any special cases to consider?

Second (minor) question, while I'm at it: This sentence only applies to checkbox and radio, right? (it's a little ambiguous - I'd make it clearer):

Due to Bootstrap internals, the label is already rendered by form_widget().

Ping @Nyholm & @mpiot

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