Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Form] Suggestion: Add CSS hyphens: none when expanding the {{ value }} placeholder in error messages #60319

Open
@ThomasLandauer

Description

@ThomasLandauer

Description

While playing around with long email addresses, I noticed that they sometimes get hyphenized in form's error messages: With

#[Assert\Email(message: '{{ value }} is not a valid email address')]

... when entering [email protected], then the error message might come out as:

foooooooooooo-
[email protected]
is not a valid email address

So I'm suggesting to wrap {{ value }} into a <span style="hyphens:none">.

At first, I thought about adding an additional flag (like e.g. {{ value|hyphensNone }}), but now I'm thinking that any modification of the user's input might lead to confusion, so it's probably better to always suppress hyphenation.

Open question: How to deal with non-HTML output?

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions