Data validation using Ojay.Forms
This example demonstrates the use of Ojay.Forms to produce validation rules for forms.
Ojay takes care of intercepting submit events, extracting data and validating it,
making Ajax calls and delivering the response back to your code, and marking inputs and
labels as invalid where appropriate. All you need to do is define what valid data looks
like and say how you want to display the errors.