10000 Validation messages: avoid "Please enter…" messages · Issue #39055 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Validation messages: avoid "Please enter…" messages #39055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gharlan opened this issue Nov 11, 2020 · 13 comments
Closed

Validation messages: avoid "Please enter…" messages #39055

gharlan opened this issue Nov 11, 2020 · 13 comments
Labels
Help wanted Issues and PRs which are looking for volunteers to complete them. RFC RFC = Request For Comments (proposals about features that you want to be discussed) Stalled Validator

Comments

@gharlan
Copy link
Contributor
gharlan commented Nov 11, 2020

Since #30931 many new messages start with "Please enter…", like "Please enter a valid email address".

I suggest to avoid these kind of messages, and to replace them with messages like "This value is not a valid email address".

Reasons:

  1. At the moment there is a mix of both kind of messages. In the same form you could get the message "This value should not be blank." on one field, and on another "Please enter a valid email address.". I would prefer to get consistent messages.
  2. In German there is a difference between the informal "du" and formal "Sie" (https://www.dw.com/en/the-du-sie-dilemma-in-german/a-16494631).
    So the email address message could be "Bitte geben Sie eine gültige E-Mail-Adresse ein" or "Bitte gib eine gültige E-Mail-Adresse ein".
    At the moment the german validators file uses "Sie". But I manage a project, where we address the users by using the informal "du". So I have to replace all these validation messages.
    This could be avoided by using neutral messages like "This value is not a valid email address" / "Dieser Wert ist keine gültige E-Mail-Addresse".
    I think the same is true for some other languages (like tu/vous in french).
@gharlan
Copy link
Contributor Author
gharlan commented Nov 11, 2020

I suggest to use one of these styles:

  1. This value is not a valid email address.
  2. This is not a valid email address.
  3. This email address is invalid.

@wouterj
Copy link
Member
wouterj commented Nov 11, 2020

For reference, the current wording originated from the issue about this feature:

I suggest to

  1. Set sensible defaults for the "invalid_message" options in all core types. These defaults should be user friendly, such as "Please enter a valid email address." (or better, if you have suggestions)
  2. Duplicate the error messages of the Validator component into the Form component and change the translations to be more user friendly (in the web form context, again, such as "Please enter a valid number" or better). This will mean a bit more maintenance work, but much better UX.

@Chi-teck
Copy link
Contributor
Chi-teck commented Nov 12, 2020

For reference, in Drupal "Please" is explicitly disallowed in interfaces messages.

The world "Please" sets an unfriendly type of language, where its intention is to make "commands" more friendly it usually sets the wrong tone - implying a user HAS to do something.

https://www.drupal.org/project/drupal/issues/679890

@gharlan
Copy link
Contributor Author
gharlan commented Nov 12, 2020

The error message guidelines from Microsoft also recommend to avoid "please":

Avoid the word "please," except in situations in which the user is asked to do something inconvenient (such as waiting) or the software is to blame for the situation.

https://docs.microsoft.com/en-us/windows/win32/uxguide/mess-error

@javiereguiluz javiereguiluz added RFC RFC = Request For Comments (proposals about features that you want to be discussed) Validator labels Nov 14, 2020
@wouterj
Copy link
Member
wouterj commented Jan 11, 2021

Given Drupal and Microsoft apply this standard, I'm 👍 for removing "please" from our validation/form errors (they are much more UX experts than I am).

@wouterj wouterj added the Help wanted Issues and PRs which are looking for volunteers to complete them. label Jan 11, 2021
@gharlan
Copy link
Contributor Author
gharlan commented Jan 11, 2021

But would you only remove the word "please", or would it be ok for you if we address my main concern and change the messages to a neutral style (formal vs. informal in some languages)?

  • current message:
    • en: "Please enter a valid email address"
    • de (formal): "Bitte geben Sie eine gültige E-Mail-Adresse ein"
    • de (informal): "Bitte gib eine gültige E-Mail-Adresse ein"
  • without "please"; better, but my main concern still exists:
    • en: "Enter a valid email address"
    • de (formal): "Geben Sie eine gültige E-Mail-Adresse ein"
    • de (informal): "Gib ein gültige E-Mail-Adresse ein"
  • neutral message:
    • en: "This is not a valid email address"
    • de: "Dies ist keine gültige E-Mail-Adresse"

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@gharlan
Copy link
Contributor Author
gharlan commented Jul 12, 2021

Yes

@carsonbot carsonbot removed the Stalled label Jul 12, 2021
@wouterj
Copy link
Member
wouterj commented Jul 12, 2021

Is there anyone open to work on this?

@rvanlaak
Copy link
Contributor

@wouterj we could also make such policy rules part of the checks that happen via translation-status.php

In PR #42201 I've added running that script to CI. What about improving the script once that PR is merged?

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@carsonbot
Copy link

Just a quick reminder to make a comment on this. If I don't hear anything I'll close this.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Issues and PRs which are looking for volunteers to complete them. RFC RFC = Request For Comments (proposals about features that you want to be discussed) Stalled Validator
Projects
None yet
Development

No branches or pull requests

6 participants
0