Editorial team ·

Make the form error tell you what to fix

Editorial cover: Make the form error tell you what to fix
AI-generated illustration.

You fill in a workshop form, hit Submit, and get “Invalid input.” Nothing tells you which line to look at. A useful message can be just as short if it includes what needs fixing. Try it once with a blank name and once with a date typed the way your phone suggests.

Put the next step in the message

Three failures on a practice form
Try this A message that explains the fix
Leave Name blank Enter your name.
Type 15/01/26 in Date Use YYYY-MM-DD, for example 2026-01-15.
Enter 145 characters in Details Use 140 characters or fewer. Remove 5 characters.

On the practice form below, the name is required, the date uses year-month-day, and the details field is limited to 140 characters. Test one failure at a time first. That makes it easier to tell whether a message belongs to the right field.

“Use YYYY-MM-DD, for example 2026-01-15” gives someone a direction and a model. If the screen also provides a date picker, check that the example, field label, and picker produce a compatible format.

Check whether the error is visible near the field and can be found with a keyboard or screen reader. A summary at the top can help when several entries need attention. Test its links if it offers them.

Fix the entry and try the form again. Confirm the old message clears at the relevant point and that the values you typed into other fields are still there. That final step shows whether recovery is as clear as the first message.

Check how the message reaches the person

  1. Start with one failed field
    • Record the exact input from the practice form.
    • Read the error at the field and in any summary.
  2. Test the way back
    • Use the keyboard to reach the field.
    • Fix it and check that the rest of the form survives.

Questions and answers

Is a red border enough to explain the error?
Provide text that identifies the field and describes the problem. A border can help people spot it.
Should every error include an example?
Use an example when it makes a format or a correction clearer.
Do all forms need the same kind of error summary?
Test that people can find and correct the errors. A summary can help on long forms or after several failures.

W3C WCAG 2.2: Error Identification

W3C WCAG 2.2: Error Suggestion