Today's example of YACJL (Yet Another Cool JavaScript Library) is "as you type":
form validation. Finally! a way to make sure your customers enter stuff exactly the way you want them to!
But wait. You still need all the same validation on the back end, on your server. And until server-side JavaScript launches, done differently. Anyone can POST any data they like to the forms of your app - no matter how much guard JavaScript you load into your pages. So now you have two sets of validation that are almost certainly not going to match exactly. Hopefully the server-side one is tougher.
Oddly, the documentation makes no mention of the trap for the unwary. In fact it even suggests you don't have to worry about it:
This is useful for validating everything in a form when it is submitted. The return value of this can be used as a return value for the onsubmit event, to stop the form from submitting if any fail. The messages of the LiveValidation object will be displayed as if you have typed them in.