Error summary
Use this component to summarise any errors a user has made. It displays a numbered list of links to each of the answers that have validation errors.
This component must be placed at the top of the page, immediately below the H1 title.
When a user tries to proceed to the next step or tries to submit a form that contains an error, the page will automatically scroll up to display it.
Always show an error summary when there is a validation error, even if there’s only one.
Make your error messages clear and concise.
Report an abandoned vehicle
This component displays also displays an error message on each field or set of fields that contains an error.
This example shows how a question with radio buttons looks in its error state. The error state of each component is detailed on its individual page. The code snippet contains the functionality for all of them.