Usability heuristic

Error prevention

Design screens so mistakes are hard to make: constrain input, check it as people type, and confirm only risky actions.

Error prevention The same form field checked at two moments. Checked only after Submit, the taken name comes back as an error. Checked as you type, the problem is fixed on the spot. In a 2009 test, inline checks gave 22% more completions, 22% fewer errors and 42% less time. Same field, checked at two moments Checked as you type, vs after submit Checked only after Submit acme Submit “Name taken”: go back and fix it Checked as you type acme-studio Submit “Available”: fixed before moving on 22% more people completed the form 22% fewer errors made 42% less time to finish Catch the error before Submit, not after Wroblewski and Etre, 2009: 22 people, indicative
Wroblewski and Etre (2009, 22 people): checking a field as people type, not after Submit, gave 22% more completions, 22% fewer errors and 42% less time.

Error prevention is Nielsen's fifth heuristic: good error messages matter, but it is better to stop problems from happening. On this site it covers inline validation, guided input and early warnings: a live "Subdomain available" check, a Connect button disabled until the form is complete, a placeholder that shows what a good prompt looks like, a danger zone set apart in red.

NN/g splits errors into slips (you meant to do one thing and did another, often on autopilot) and mistakes (your mental model was wrong). Slips are prevented with constraints, good defaults and forgiving input formats; mistakes with clear previews, conventions and warnings before commit. On forms, Luke Wroblewski's 2009 study with Etre (22 participants) found that inline validation raised success rates by 22%, cut errors by 22% and cut completion time by 42% compared with validating on submit. The authors called those numbers indicative given the small sample.

In onboarding and setup flows, an error caught late is expensive: a wrong connection string or schema discovered after import means starting over, and many people do not come back.

How to use it

  • Validate fields as people finish them (availability, format, connection test) instead of after Submit.
  • Disable or hide actions that cannot work yet, and say what is missing.
  • Add a test or preview step before irreversible actions like importing data, sending invites or deleting a connection.

Watch out

  • Confirmation dialogs on every action train people to click through without reading, so save them for destructive steps.
  • "I've done it!" buttons that move on without checking feel helpful but push the error to a later, costlier step.

Related

Error prevention in real products 8 working · 2 not