INTERMEDIATE · CHAPTER 16 OF 30
Form Design, Validation & Error States
What makes a form error message useful?
A useful error identifies the problem, explains how to correct it and preserves the person’s input. Associate the message with its field and avoid relying on colour alone. I also check the recovery path with a keyboard in the implemented form.
We’ll design field states, validation and recovery for the collection flow. I’ll pay particular attention to preserving input, writing specific error messages and distinguishing progress from confirmed success.
These are instructional interface states. A coloured border alone is insufficient: the text explains the issue and the next action.
Open full-size diagram ↗- Default: Collection time
- Error: 8:30 is unavailable. Choose another time.
- Recovery: 8:45 selected
The principles I want you to understand
Every interactive element has behaviour. Consider default, hover where relevant, focus, selected, loading, error, success, disabled, and empty states. Not every component needs every state, but the design must account for meaningful conditions.Reference: W3C WAI: accessible forms
Labels identify fields. Placeholders offer examples but should not replace persistent labels. Help text explains unusual requirements. Error messages identify the problem and offer a correction. A red border alone cannot do that.
Let’s build it, step by step
- List the information genuinely required for collection. Remove fields without a clear purpose.
- Order fields according to the task. Group related information.
- Use appropriate controls: a choice list for available collection slots, a quantity control for item count, and a text field for contact details.
- Write visible labels and examples where helpful. Explain required fields consistently.
- Plan validation timing. Avoid showing an error before the user has had a reasonable chance to complete a field.
- Create an unavailable-slot state with alternative times.
- Create a submission error that preserves the entered information and offers a retry.
- Create success feedback showing what was recorded and what happens next.
How I would approach this example
“Invalid input” does not help someone recover. “Choose an available collection time” points to the needed action. If a previously available slot becomes full, explain the change and let the person choose another without re-entering the entire order.
For a real payment flow, the interface must reflect the actual system state. A timeout does not necessarily mean a payment failed. Design the wording and recovery path with the engineering team so people are not encouraged to pay twice.
Your studio exercise
For this exercise, I want you to deliver the normal form, a field error, an unavailable-time state, a submission failure, and a confirmation. Include keyboard order and how focus should move after an error. I would consider this exercise ready when a person can correct a mistake without losing their work or guessing what happened.
Use AI to draft alternative messages with constraints: plain language, specific next action, no blame, and no invented system outcome. Choose the message that matches actual behaviour.