Error message does not suggest fix

Link to Error message does not suggest fix copied to clipboard

form-error-unhelpful

Rule

Error feedback MUST be meaningful.

Background

Even when people are aware that an error in a form has occurred, they may not know how to correct it. Whenever it is possible, error messages should provide appropriate suggestions for correction of an input error such as: an example format for a date or account number; information on characters that may not be used in a field; or notification that data is not within the expected range. This will allow people to recover from mistakes more easily while filling out a form.

How to Fix

Fix this issue by identifying the reason for the error, for example: An expiration date entry fails validation. Instead of a generic message such as "Expiration date is not valid", provide specific feedback as to what went wrong:

  1. If the entered date failed because the format was not valid, the message could say "Enter expiration date in mm/yyyy format"
  2. If the entered date failed because the time frame was not valid, the message could say "Expiration date must not be in the past"
  3. If the entered date failed because invalid characters were entered, the message could say "Expiration date must only contain numbers"