Chapter #45. Validate Data Entry as Soon as Possible
Validation on a form means showing the user visual feedback that there's a problem with some of the information they've painstakingly entered. Validate data entered into a field as soon as possible, when the user moves to the next field, so you know they're done typing in the current one.
Client-side validation isn't always technically possible, but you should aim for it wherever you can because the "round trip" to the server and back is frustrating if there are errors.
There are lots of techniques for doing this, including plenty of third-party validation libraries for popular programming languages and frameworks. In the bad old days, the user would get a (sometimes partially-filled) form back after submitting, with errors marked in red like school homework.
Nowadays, it should be possible to show the user what they've done wrong (for example, too few digits for a phone number) and the...