February 2, 2008
6:44 pm | Last updated: February 2, 2008 at: 6:48 pm

Jörn Zaefferer has updated, overhaul and released the version 1.2 of 1.2 of his “jQuery Validation Plugin”. In this releaase — “Remote validation is now possible and very easy to use. Overall performance has increased a lot, and dynamic forms work by default, no extra setup or API calls necessary.”

Here are some of the cool new features added in:

  • AJAX-captcha validation example (based on http://psyrens.com/captcha/)
  • Support for "remote" ajax-validation. In other words: Remote validation is now possible and very easy to use.
  • Added highlight and unhighlight options, by default toggles errorClass on element, allows custom highlighting
  • Added valid() plugin method for easy programmatic checking of forms and fields without the need to use the validator API
  • Added rules() plguin method to read and write rules for an element (currently read only)
  • Replaced regex for email method, thanks to the contribution by Scott Gonzalez, see http://projects.scottsplayground.com/email_address_validation/
  • Restructured event architecture to rely solely on delegation, both improving performance, and ease-of-use for the developer (requires jquery.delegate.js)
  • Added feature to merge min + max into and range and minlength + maxlength into rangelength
  • Added support for dynamic rule parameters, allowing to specify a function as a parameter eg. for minlength, called when validating the element
  • Allow to specify null or an empty string as a message to display nothing
  • Rules overhaul: Now supports combination of rules-option, metadata, classes (new) and attributes (new), see rules() for details
  • Added remember-the-milk-demo (thanks RTM team for the permission!)
  • Added marketo-demo (thanks Glen Lipka!)

One of the best features of this release is the remote validation via Ajax. This is extremely easy to implement with the code being as simple as this:

 <input id="email" class="required email" remote="emails.php" maxlength="40" name="email" /> 

If you enter an email address, the validation plugin sends a request to the server with a parameter “email” and the value you entered. The server-side code can do it's magic and send back the appropriate response based on the user input.

Adding client-side validation to a form can significantly improve the usability of that form, making it much easier for users to fill them out successfully. But pure client-side validation has severe limits where necessary information is available only on the server. Ajax helps to bridge the gap, but synchronizing validation on form submit isn’t exactly an easy task. The validation plugin makes it as simple as pure client-side validation. All you need to do is to specify a rule “remote” for a field and provide a parameter that points to a server-side resource that handles the validation.

jQuery Validation plugin // Demo:  Marketo.com // Remember the Milk

jQuery, Plugin, Plugins, Validation, jQuery Validation, JavaScript, Ajax, Release, CAPTCHA

Loading

Contextual Related Posts:

No comment yet

Leave a comment »

  1. Pingback from
    1
    AJAX coding school » Blog Archive » AJAX Demos [2008-02-03 01:11:49] says:February 2nd, 2008 at 8:29 pm

    [...] jQuery Validation Plugin v1.2 released By DG Added marketo-demo (thanks Glen Lipka!) One of the best features of this release is the remote validation via Ajax . This is extremely easy to implement with the code being as simple as this:. PLAIN TEXT … D’ Technology Weblog - http://www.ditii.com [...]

Leave a Response

Comment Preview
« Yahoo! ASTRA Flash and Flex components releasedAjax Security by Billy Hoffman – Book Review »
Feed Icon

Subscribe via RSS or email: