HTML5 ships a complete validation engine that runs before the form ever reaches your server. With the right attributes you can enforce required fields, minimum lengths, number ranges, and custom regex patterns — all without writing a single line of JavaScript. You also get CSS hooks to style valid and invalid states in real time.
1-A 2-A 3-A 4-A | 5 empty 6 number/date 7 = <input required minlength="3" maxlength="12"> 8 = <input pattern="[0-9]{4}" title="4 digits"> 9 = Client = instant UX; server = security (client can be bypassed) | 10 = Style fields that fail validation (e.g. red border)