Form Validation by Class

The object of this script is the client side validation of a form based on rules establised through class statements in the form elements.

The script adds functionality to the page in an unobtrusive manner. In the same way formating is separted from structure in CSS, the object here is to separate the functionality from the the structure. Using class names form elements are validated using existing, semantically legal structural elements.

Not all validation options are covered. Radio and checkbox options have yet to be added.

Validation by Class Testing

Name:
Email Address:
From Date:
Past Date:
Number:
My Selection:
 

The form above displays many of the features of the validation by class script. Dates are in the Australian format dd/mm/yyyy.