Error message content
A rejected form often fails to say which field is wrong, what is wrong with it, or how to fix it.
The answer
Say which field is wrong and how to fix it, right next to the field. As strong as the weakest rule behind it: strong.
-
Say which field is wrong and what the problem is, in words.
WCAG 2.2 level A. Reopened and checked in the pilot.
- Applies when
- Always.
- Based on
- Standard or law
- Principle
- Help people recover from errors
- StandardStandard: Understanding SC 3.3.1 Error Identification (Level A)W3C WAI
-
When you know the fix, say it.
WCAG 2.2 level AA (3.3.3), with an exception where a suggestion would compromise security or purpose. Reopened and checked.
- Applies when
- The system can tell what a correct value would be, and saying so does not weaken security.
- Based on
- Standard or law
- Principle
- Help people recover from errors
- StandardStandard: Understanding SC 3.3.3 Error Suggestion (Level AA)W3C WAI, 2026
-
Show each error next to its field, not only at the top or bottom.
A controlled online study (303 people) found messages near the field were found faster and led to fewer repeat errors than messages at the top or bottom; practitioner sources agree. Skeptical pass: total completion time rarely differed, the forms were short, and a 42-person study found no difference between top and under-field messages, which is a null result, not a contrary one. Held at 4.
- Applies when
- Always.
- Based on
- Research
- Principle
- Make controls match their effects
- Common mistake
- Messages only at the top of a long form (rule 3).
- ExperimentsExperiment: User-friendly locations of error messages in web forms: Put them on the right side of the erroneous input fieldSeckler, 2012
- Experiment: Usable error message presentation in the World Wide Web: Do not show errors right awayBargas-Avila, 2007
- User researchUser research: Comparing the Effectiveness of Alternative Approaches for Displaying Edit-Error Messages in Web FormsWilliam Mockovak, 2005
- GuidanceGuidance: Error-message guidelines for formsNielsen Norman Group
- Guidance: Error message componentGOV.UK Design System
- Guidance: Form component and guidance (USWDS)U.S. Web Design System
The other rules
-
Don’t show form errors in a dialog that covers the form.
One controlled study found a dialog listing all errors produced about three times the repeat errors of in-form messages; a second (100 students) found in-form messages about a second faster. Two studies, one with a small effect, so 3.
- Applies when
- Always.
- Based on
- Research
- Principle
- Keep people in control
- Common mistake
- One dialog listing every error (rule 4).
- ExperimentsExperiment: Usable error message presentation in the World Wide Web: Do not show errors right awayBargas-Avila, 2007
- Experiment: hofseth-2019-popup-vs-inform
-
Describe what’s wrong with this input. Don’t use one generic message for every problem.
Baymard reports this from checkout testing without participant numbers; NN/g, Atlassian and GOV.UK agree. No controlled web-form study isolates wording, so 3.
- Applies when
- Always.
- Based on
- Practitioner research
- Principle
- Help people recover from errors
- Common mistake
- 'Invalid input' with no reason (rule 5).
- User researchUser research: Adaptive validation error messages (checkout)Baymard Institute
- GuidanceGuidance: Error-message guidelines for formsNielsen Norman Group
- Guidance: Error messages (content guidelines)Atlassian Design System
- Guidance: Error message componentGOV.UK Design System
-
Link each error to its field in code so screen readers read them together.
A W3C sufficient technique and what GOV.UK and Polaris do. It is one way to meet 3.3.1, not itself required, so 3.
- Applies when
- Always.
- Based on
- Convention
- Principle
- Work for everyone
- StandardStandard: ARIA21: Using aria-invalid to Indicate An Error FieldW3C WAI
- GuidanceGuidance: Text field (Polaris, from GitHub source docs)Shopify Polaris
- Guidance: Error message componentGOV.UK Design System
-
Keep what people typed when you show an error.
GOV.UK says not to clear fields; no dissent found. One source only so far, kept at 3 pending Preserving input after an error, where WCAG 3.3.7 also bears.
- Applies when
- Always.
- Based on
- Practitioner research
- Principle
- Keep people in control
- GuidanceGuidance: Error message componentGOV.UK Design System
-
On sign-in and password reset, don’t reveal whether an account exists.
Baymard's caveat to its own advice, matching the security exception in WCAG 3.3.3. Rated 3.
- Applies when
- The message could confirm that an account exists.
- Based on
- Practitioner research
- Principle
- Prevent errors
- User researchUser research: Adaptive validation error messages (checkout)Baymard Institute
- StandardStandard: Understanding SC 3.3.3 Error Suggestion (Level AA)W3C WAI, 2026
-
Don’t blame the person.
Design-system advice without evidence; the only studies measured preference for apologies in games with teenagers, and about a quarter found them awkward. Rated 2.
- Applies when
- Always.
- Based on
- Convention
- Principle
- Speak the person’s language
- ExperimentExperiment: Computer Apology: The Effect of the Apologetic Feedback on Users in Computerized EnvironmentAkgun, 2005
- GuidanceGuidance: Error messages (content guidelines)Atlassian Design System
- Guidance: Error-message guidelines for formsNielsen Norman Group
Accessibility
- WCAG 2.2 · 3.3.1WCAG 2.2, 3.3.1 Error Identification (A) and 3.3.3 Error Suggestion (AA).
- WCAG 2.2 · 4.1.3WCAG 2.2, 4.1.3 Status Messages (AA) when the message appears without a focus change.When to validate a form field
- WCAG techniqueW3C technique ARIA21: mark the field invalid after a failed check and point it to the message. A technique, not a requirement.
Open questions
- OpenWording: no controlled web-form study isolates what a message says. A large randomized trial of clearer error messages exists for programming exercises, read as an abstract only.
- OpenWhich side of the field. The one study found messages to the right preferred; that depends on layout and reading direction and is not stated as a rule.
- OpenTone and apology: preference data only.
Sources
- ExperimentsExperiment: User-friendly locations of error messages in web forms: Put them on the right side of the erroneous input fieldSeckler, 2012
- Experiment: Usable error message presentation in the World Wide Web: Do not show errors right awayBargas-Avila, 2007
- Experiment: hofseth-2019-popup-vs-inform
- Experiment: Computer Apology: The Effect of the Apologetic Feedback on Users in Computerized EnvironmentAkgun, 2005
- User researchUser research: Comparing the Effectiveness of Alternative Approaches for Displaying Edit-Error Messages in Web FormsWilliam Mockovak, 2005
- User research: Adaptive validation error messages (checkout)Baymard Institute
- StandardsStandard: Understanding SC 3.3.1 Error Identification (Level A)W3C WAI
- Standard: Understanding SC 3.3.3 Error Suggestion (Level AA)W3C WAI, 2026
- Standard: ARIA21: Using aria-invalid to Indicate An Error FieldW3C WAI
- GuidanceGuidance: Error-message guidelines for formsNielsen Norman Group
- Guidance: Error message componentGOV.UK Design System
- Guidance: Form component and guidance (USWDS)U.S. Web Design System
- Guidance: Error messages (content guidelines)Atlassian Design System
- Guidance: Text field (Polaris, from GitHub source docs)Shopify Polaris
Related
- When to validate a form fieldCheck on submit, and do not show an error until people have finished the field.Answer: moderate.
- Error summariesAfter a failed submit, list every error at the top, each linking to its field, and keep the message at each field too.Answer: moderate.
- Preserving input after an errorNever make people type something twice. Keep what they entered through errors and back steps.Answer: weak.
- Log inNever block paste or password managers, and slow repeated attempts instead of locking people out.Answer: weak.