Form errors
Form errors happen when the system encounters invalid inputs, and they persist until resolved. Responsible form design offers users contextual and relevant information for correcting any errors in order to meet the necessary input criteria.

Types of form errors#
There are two types of form errors: single input and group input. The type impacts how the error is triggered and displayed.
A single input error affects only one component. A group input error reflects that there are errors with several components, and the errors are aggregated into a single message.
Types of form validation#
There are two ways for how a form can be validated. Either is acceptable, depending on user needs and product use cases.
Usage guidelines#
Don’t show input errors until the user is done typing#
For real time validation, make sure that the user is completely finished entering information before showing any input errors. Showing an error before being done with typing is frustrating and confusing.


Use a “(required)” or “(optional)” label consistently throughout a form to help prevent errors in the first place#
In a single form, mark only the required fields or only the optional fields, depending on whichever is less frequent in the entire form.
If most of the fields are optional, only the required fields should be give an asterisk icon or have labels appended with “(required)”. If most of the fields are required, only the optional fields should be appended with “(optional)”. Never use an asterisk icon to note that a field is optional.




Content standards#
Write specific and helpful error messages using help text#
Communicate error messages in a human-centered way by guiding a user and showing them a solution — don’t just state what’s wrong and then leave them guessing as to how to resolve it. Ambiguous error messages can be frustrating and even shame-inducing for users. Also, keep in mind that something that a system may deem an error may not actually be perceived as an error by a user.
For help text, usually the error is related to something that needs to be fixed for in-line validation, so a
Learn how this applies to help text for




Write an in-line alert message as a high-level summary#
When aggregating error messages into an in-line alert, give a high-level summary of what the issue is with the form. Don’t point out each and every field that needs to be addressed; this is a security risk.




Keep error messages brief and informative#
Forms are utilitarian, and not a place to be overly emotive. When an error happens, just tell the user what’s happening and what they can do to resolve the error to complete the form. View




Changelog#
- This item has been added to the website