Validate Data Entry as Soon as Possible
Validation on a form means showing the user some 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.
![Validate Data Entry as Soon as Possible](https://static.packt-cdn.com/products/9781803234885/graphics/Images/B18307_51_01.png)
Figure 51.1: Tell the user to try again before they submit the form
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...