Recover from validation errors

Check information from the user to ensure it is valid. In the case of a validation error, inform the user what is wrong and how to fix it.

How it works

Validation should refuse to accept:

  • Information that cannot be correct (ie. email with no "@" symbol)
  • Missing information, if it is required

If the users' input fails validation:

  • Show the page again that is filled with the user's information
  • Show error messages next to fields with errors that include what requirements have not been met

Use Cases

When to use

Use this pattern to identify when a user has provided information that cannot be used. Then, show an error message that helps the user resolve the problem.

Minimize the chances of needing to show an error message by:

  • Using clear and concise labels/prompts
  • Accepting information in reasonable varying formats (ie. a postal code with or without spaces) 

 

When not to use

Do not use validation for higher level issues beyond incorrectly filled form fields.

Tips

Do not include language in the error message that is not helpful. Words like "sorry" or "error" do not add to the message or fix the problem, so leaving it out will help streamline the process by getting to the point.