Validation messages - smbc-digital/patterns GitHub Wiki
Contents
โ User needs โ How it works โ Research into this pattern
User needs
To ensure the information that the user gives is valid, a check is performed. This confirms if thereโs a validation error and informs the user what has gone wrong and how to fix it.
How it works
Use a validation message to identify when the user has failed to provide the information in the format you are expecting. To help the user, you should show the user an error message that allows them to fix the problem.
For styling follow GOV.UK
Label | Field Type | Validation messages |
---|---|---|
First name | Text | Enter your first name |
Last name | Text | Enter your last name |
Date of birth | Memorable date | Enter a date of birth |
Enter the date | Date picker | Enter the date |
Postcode lookup | Alphanumeric | Enter your postcode |
Address line 1 | Alphanumeric | Enter your address |
Town | Text | Enter your town |
Enter your postcode | Text | Enter your postcode |
Select the address below | Text | Select your address from the list |
Phone number | Alphanumeric | Enter a phone number |
Email address | Text | Enter your email address |
Confirm the/your email address | Text | You must answer this question |
Research into this pattern
For the development of this pattern, we looked closely at: