
Functions
How to Compose Validators From Small Functions
Build input validation from small reusable checks that combine with all, any and field maps, and return clear error messages instead of throwing. Node.js 24.
8 min read
Tag
4 posts

Build input validation from small reusable checks that combine with all, any and field maps, and return clear error messages instead of throwing. Node.js 24.

Validate a form with the Constraint Validation API: validity states, setCustomValidity, checkValidity, reportValidity, custom messages and accessible errors.

Validate JavaScript function arguments without a library using typeof checks, assertion helpers, clear error messages and a small schema checker. Node.js 24.

Build a multi-step form wizard in vanilla JavaScript with per-step validation, a progress indicator, back and next buttons, saved answers and accessible focus.