Forms & Validation
Build forms that are accessible, validate input on client and server, report errors clearly and handle submission states.
3 objectives 6 steps about 135 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Build forms from native controls with visible labels, grouped fields, correct input types and autocomplete tokens, fully usable with a keyboard.
- Validate with native constraints and a shared schema, showing inline errors linked to their fields and an error summary that screen readers announce.
- Handle submission in React with controlled or uncontrolled inputs and form actions (useActionState, useFormStatus), including pending state, double-submit prevention and server-returned errors, treating server-side validation as mandatory.
Lesson plan
6 steps, about 135 min · 5 of 5 lessons available so far
- Native Form Controls Done Right Concept · 20 min
- Constraint Validation and Error Messages Everyone Can Perceive Worked example · 25 min
- Controlled, Uncontrolled and FormData Concept · 20 min
- Form Actions and Pending States in React Worked example · 25 min
- Lab: A Multi-Step Signup Form with One Shared Schema Lab · 30 min
- Check: Audit a Form Knowledge check · 6 questions
Practise it
Build a checkout form (address, delivery option, payment method) with native input types and autocomplete, one schema reused by the client and a mock server action, an error summary that receives focus after a failed submit, and a pending button that prevents double submission.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.