Release: Validation plugin 1.2

Its finally done, the 1.2 release of my validation plugin is out. Check the plugin page for links to the download, demos and documentation, which has been completely overhauled.

From the changelog:

  • Added AJAX-captcha validation example (based on http://psyrens.com/captcha/)
  • Added remember-the-milk-demo (thanks RTM team for the permission!)
  • Added marketo-demo (thanks Glen Lipka!)
  • Added support for ajax-validation, see method “remote”; serverside returns JSON, true for valid elements, false or a String for invalid, String is used as message
  • 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)
  • Moved documentation from inline to http://docs.jquery.com/Plugins/Validation – including interactive examples for all methods
  • Removed validator.refresh(), validation is now completey dynamic
  • Renamed minValue to min, maxValue to max and rangeValue to range, deprecating the previous names (to be removed in 1.3)
  • Renamed minLength to minlength, maxLength to maxlength and rangeLength to rangelength, deprecating the previous names (to be removed in 1.3)
  • 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 (see marketo demo)
  • Rules overhaul: Now supports combination of rules-option, metadata, classes (new) and attributes (new), see rules() for details

In other words: 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.

-Jörn

No more comments.
  1. Wow! Great news! I will test this and send you a donation tomorrow.

  2. Rey Bango

    Sweet! Can’t wait to check it out! Great job Joern!

  3. Jacob

    this is so great, thx for this update!

  4. Alexandre

    HI Jörn,
    I am trying to add dynamically fields to the form and then adding rules to them for validation. However, it does not seem to work the way I do it. It used the be a refresh() method where the form could be refresh after adding new fields, but it is gone now I think.

    function addRow() {

    var duplicatetemplate1 = jQuery.format($j("#duplicateTemplate1").find('tbody').html());

    $j(duplicatetemplate1(iii++)).appendTo("#duplicateField1");

    //Add the rules

    $j("#keyvalue" + iii).rules("add", {
    required: true
    });

    }
    var iii = 1;


    and my field to be duplicated is contained in a div as follow:

    email3 {0}*

    Anyway, when you will get a chance. I know this can work.;)

  5. Ken

    HI Jörn,
    I have used captcha image, when i click reseft captcha image, so it reload page. please fix it for somebody ^^
    Thanks so much !
    great plugin