Error prevention beats error messages: constrain inputs, confirm destructive work, offer undo, and design defaults that match the common safe path.
Forgiving inputs
Masks, format-as-you-type, autocomplete, and server-side normalization reduce typos before they become validation failures.
Confirmations
Use typed confirms for irreversible actions; rely on undo for reversible ones. Frequency matters — don’t train users to skip dialogs.
Defaults and constraints
Disable impossible combinations, gray out invalid dates, preselect shipping aligned with inventory. Explain why something is blocked.
Practices
- Double confirmation only for irreversible harm.
- Autosave drafts in long editors.
- Disable submit until required fields valid.
Common pitfalls
- Blaming users in copy (“Invalid input”).
- Confirm dialogs for every minor action.
- No undo after soft delete.