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 10 working · 3 not

Wonder: Rules before you fail Wonder (working) Rules before you fail The password rules are listed up front and tick off as you type, instead of an error after you submit. Paper: A way out if it fails Paper (working) A way out if it fails If the app link is blocked or ignored, "click here" tries again instead of leaving you stuck. Viktor: The placeholder teaches Viktor (working) The placeholder teaches "Say the outcome and what done looks like" is a mini prompt-writing lesson. Count: Connect disabled until ready Count (working) Connect disabled until ready The greyed-out button signals the form isn't complete yet. Count: Danger zone set apart Count (working) Danger zone set apart "Delete connection" sits alone under its own heading in red outline. Retool: Live subdomain check Retool (working) Live subdomain check "Subdomain available" confirms the choice before you hit Continue. Tinybird: Check before import Tinybird (working) Check before import "Check your column names and types" warns before the schema is locked in. Tinybird: Limits up front Tinybird (working) Limits up front "Supports CSV (500MB), NDJSON (500MB) and Parquet (50MB)" before you pick a file. Holistics: Test before saving Holistics (working) Test before saving "Test Connection" is the only button, so errors surface before you move on. Google One: Warning well before the limit Google One (working) Warning well before the limit Sent at 72%, which leaves time to act before anything breaks. Orca: First thing is an error Orca (not working) First thing is an error "Claude wasn't found": the default agent from step 2 was never installed. Peliqan: Save without a test Peliqan (not working) Save without a test Save and Invite have the same weight, and there is no "Test connection" before saving. Lightdash: Honor-system button Lightdash (not working) Honor-system button "I've defined them!" moves on without checking, so mistakes surface later.