资 源 简 介
Prior to using JQuery, I had developed Javascript object that validated forms prior to submission. I got the basic concept (and some code) from the book, “Beginning Ajax with PHP” by Lee Babin. I modified it a great deal. Once I began using JQuery, I converted the Javascript object to a JQuery plugin. Unlike most validation plugins which validate input on exit of the field (onBlur), the imValidateForm plugin validates the entire form once the user clicks the submit button. The plugin also handles the submission (ajaxally, of course) and allows you to disable the submit button to prevent double-clicking.
The imValidate plugin will validate the following:
Required Fields/Exclude Values
Valid Email
Either/Or (Either input 1 or input 2 must be entered)
Valid values (Must be equal to)
Checked Values (is the field checked)
Is Numeric
Is Alpha Only
Meets Condition (==, !=, <, <=, >, >=)
To view the documentation, go to:
http://grasshopperpebbles.com/ajax