Combining client-side and server-side validation
When dealing with real web forms we usually need to do various kinds of validation on multiple fields. Some fields may only need checks that can be performed at the client side, while some might also require server-side validation.
In this recipe, we're going to design and implement our own validation plugin that supports asynchronous validation. It will work similarly to jQuery Validate. We're also going to implement some basic validation methods such as
We're going to use these methods on a simple user registration form, which will be blocked from submission until the user enters valid data in all fields.
The first step in our design process is to design ...