Examples · Forms
Inline validation
wireForm() on a server form: rules, blur-then-live, no JavaScript required to submit.
The form is a normal server form and works without JavaScript. wireForm() layers rules on top, uses the browser's Constraint Validation API for messages and accessibility, and shows errors after you leave a field, then live.
What to notice
aria-invalidand:user-invalidare set for you; the red border is one CSS rule.- The password rule lives once; “Repeat” compares against it with
matches(). - Without JavaScript the same form posts to
/signupand the server validates.
Type a 4-character password and tab away.