When dealing with user input, errors can occur. Simply warning users to avoid certain actions, but not preventing them from doing it, can lead to friction and frustration. Here are a few things to take into account.
Understanding user behaviour
The starting point is to accept that user errors can and do occur – no matter how well they know the system. Don’t assume that users will follow instructions correctly. Instead, design your product to deal with any incorrect data input gracefully.
This is about stopping users from entering invalid information within the user interface. Options include:
Input validation: Rules to ensure that users can only enter valid data. For example, enforcing a specific date format, or requiring an email address field to be formatted correctly.
Auto-correction: Where possible, auto-correction can be handy. So for instance, if a phone number doesn’t need a zero at the start, remove it if the user adds it in.
Smart defaults: Set sensible defaults for fields, to reduce the chance of users entering incorrect information. These can also save time if the user can skip over an option that’s already selected.
When errors do occur, provide clear and immediate feedback to show something doesn’t look right. Avoid generic error messages and provide specific guidance on how to solve the issue.
Inline validation: Validate user input in realtime and provide feedback as information is entered. This is a better experience than only seeing errors after submitting a long form, and having to go back to find which fields need changing.
Helpful error messages: Write error messages that tell the user where issues occur, and what to do to solve them.
Visual cues: Try using visual cues such as different colours or icons to highlight fields with errors. This helps users to quickly identify and resolve issues. For accessibility reasons, don’t rely on colour alone.
What not to do
Here a few things you should avoid doing:
- Forcing too many fields to be mandatory: Does an online form need to have a phone number as a required field? Don’t force users to fill in data they might not have – they will either fill in false data, or abandon the form and not submit it.
- Long forms without inline validation: If you have a short form such as a login form, you could show any errors after submitting. But for long forms, immediate, inline validation is essential. There’s nothing worse than filling in a long form, only to find half of it needs changing.
- Low character counts in multi-line text boxes: Things like special instructions to delivery companies may have limits in how much data you can include. But where possible, give users enough space to say what they need to.
I’m sure there are others! How do you deal with errors – do you prevent them, or just warn?