Level 3 · Interactive Web Applications
Module 13: Forms and Validation
Reading form values
Read text, number, select, checkbox and radio values, convert them to the right types, and collect a whole form with FormData.
Lesson 62
Input events and form submission
Choose between input, change and submit events, handle form submission with preventDefault, and reset forms safely.
Lesson 63
Native browser validation
Use HTML validation attributes, read the validity state and checkValidity from JavaScript, and style and report invalid fields.
Lesson 64
Custom validation rules
Write custom validation as pure functions, connect them to fields with setCustomValidity, and validate rules that involve several fields.
Lesson 65
Accessible form feedback
Show validation feedback that everyone can perceive: visible text messages linked with aria-describedby, aria-invalid, focus management and live regions.
Module mastery assessment
Eight questions and a browser practical covering Lessons 61 to 65: reading form values, input events and submission, native and custom validation, and accessible feedback.