Release: Validation Plugin 1.5.3

An update for the jQuery validation plugin is available. Among various bugfixes there are two new localizations (Taiwan and Kazakhstan), an enhancement to $.validator.addMethod that allows you to specify (localized) messages first, the actual method later; the submitHandler-option now keeps a submit-button “alive”, that is, won’t get lost when using the option.

Probably most notable: The remote method now allows you to specify custom messages! Return JSON “true” for a valid field, false/null/undefined for an invalid field and the default message, or any other value to use as the message.

The full changelog:

  • Fixed a bug related to the wrapper-option, where all ancestor-elements that matched the wrapper-option where selected (
  • Updated multipart demo to use latest jQuery UI accordion
  • Added dateNL and time methods to additionalMethods.js
  • Added Traditional Chinese (Taiwan, tw) and Kazakhstan (KK) localization
  • Moved jQuery.format (fomerly String.format) to jQuery.validator.format, jQuery.format is deprecated and will be removed in 1.6 (see for details)
  • Cleaned up messages_pl.js and messages_ptbr.js (still defined messages for max/min/rangeValue, which were removed in 1.4)
  • Fixed flawed boolean logic in valid-plugin-method for multiple elements; now all elements need to be valid for a boolean-true result (
  • Enhancement $.validator.addMethod: An undefined third message-argument won’t overwrite an existing message (
  • Enhancement to submitHandler option: When used, click events on submit buttons are captured and the submitting button is inserted into the form before calling submitHandler, and removed afterwards; keeps submit buttons intact (
  • Added option validClass, default “valid”, which adds that class to all valid elements, after validation (
  • Added creditcardtypes method to additionalMethods.js, including tests (via
  • Improved remote method to allow serverside message as a string, or true for valid, or false for invalid using the clientside defined message (
  • Improved accept method to also accept a Drupal-style comma-seperated list of values (

As usual, support is available via:

  • Please post questions to the jQuery discussion list, putting “(validate)” into the subject of your post, making it easier to spot it and respond quickly. Keep your question short and succinct and provide code when possible; a testpage makes it much more likely that you get an useful answer in no time.
  • Please post bug reports and other contributions (enhancements, features, eg. new validation methods) to the bug tracker (requires registration).


Just uploaded a hotfix 1.5.4 release, with a fix for the remote method.

Update II:
Uploaded another release, now at 1.5.5, hopefully the final fix for the remote method:


No more comments.
  1. Jim Brusciano

    I found a bug in the ACCEPT method: it does not control the suffix, but only if the file name ends with the characters setted. For example: test.jpg is ok, but also test.xjpg is ok! I solved the problem by inserting a “.” in your RegExp code: new RegExp(“.[\.](” + param + “)$”, “i”)).

    Anyway great work!