Inline validation
Checking an answer while someone is filling in a form and telling them straight away if something's wrong, instead of only after they submit.
Also called live validation
Example
When someone leaves the 'Email' field, a message appears beside it saying the address is missing an @, and it disappears as soon as they fix it.
When to use it
For most fields, check once the person has left the field, and remove the message as soon as it's fixed. For fields with strict rules, like a new password, showing the rules being met as people type can help.
Watch out
Evidence is mixed: one industry test found it helped, but two lab studies found showing errors after the whole form worked better, and GOV.UK checks only when people try to continue.
The evidence 7 sourced claims
Every sentence on this card traces back to one of these claims, each linked to its source. How we research
In a usability test of a sign-up form (22 people, six versions), the best inline-validation version beat checking only after submit: success rose 22%, errors fell 22%, satisfaction rose 31%, completion time fell 42% and eye fixations fell 47%.
In the same test, checking a field after people left it was faster than checking while they typed, and showing errors before people had finished typing gave the most errors and lowest satisfaction. Inline checks helped most on hard fields like usernames and passwords, and little on easy ones like names; for fields with strict rules such as a new password, live feedback as people type can help.
Two lab studies (77 and 90 students) found that showing errors immediately performed worst: many people ignored the messages and kept filling in the form. Showing all errors after the whole form was finished worked best. The authors suggest people are either in 'completion mode' or 'revision mode' and fix errors mainly in the second.
The GOV.UK Design System advises checking answers when people try to continue, not when they leave a field, and adding inline checks only if research shows they help more than harm (for example a character count), noting inline checks can cause problems for people who type slowly.
NN/g advises checking each field once the person leaves it and showing the message right beside the field, because seeing an error before you've had the chance to finish typing is frustrating; fields with strict rules, such as creating a password, are an exception where showing which rules are met while typing helps.
E-commerce testing guidance: don't flag a field before the person has finished it (check on leaving the field, or once a postcode or card number reaches its expected length), remove the error the moment the input becomes correct, and consider a positive tick for correctly filled fields.
The 20-guideline set tested by Seckler et al. (2014) says to show error messages after the form has been sent, all together, which went into forms that tested better overall.