Usage guidelines outline how the component should and shouldn’t be used in different user interface contexts.
When to use
- For errors that are pre-defined on the server-side by back-end developers.
- When a user cannot save or submit a form because they are blocked by one or more validation errors.
- When there are exceptional circumstances that the user can’t recover from, e.g., failed network requests and server errors.
- To provide further explanation or links to docs for multiple error messages.
When not to use
- For errors that communicate critical information (e.g., an expired token, a deprecated feature, storage limit reached) use a danger Callout instead.
Best practices
Do use an Error Summary at the top of the main page content, like a form.
Do display an Error Summary for 2+ errors in a form. Inline error validation should remain visible on each field.
Don't display an Error Summary in between content, like between form fields, or at the bottom of the page.
Don't bloat messaging with too much copy, as it should be readable at a glance. See Writing bulleted or numbered lists and Writing for the web for further guidance.