Update update: Files are now availble via Microsoft’s AJAX CDN.
An update for the jQuery validation plugin is available. There are five new localizations (now at 26 in total), including Arabic and Farsi (both right-to-left). Validation of selects is now more interactive, click events are properly handled to provide quicker feedback (also a bug related to selects in IE8 is fixed). The equalTo-method is now aware of changes to the target field, so a change to a password field will be reflected in a confirm-password field. And more…
The only not fully backwards-compatible change (if you spot anything else, please report it as a bug): The dateDE and numberDE methods were replaced with a localization/methods_de.js file, with localized versions of both the date and number methods. There are also localized methods for the NL and PT locales. The goal is to gather more localized versions of these, similar to the localized messages.
The full changelog:
- Added Arabic (AR), Portuguese (PTPT), Persian (FA), Finnish (FI) and Bulgarian (BR) localization
- Updated Swedish (SE) localization (some missing html iso characters)
- Fixed $.validator.addMethod to properly handle empty string vs. undefined for the message argument
- Fixed two accidental global variables
- Enhanced min/max/rangeWords (in additional-methods.js) to strip html before counting; good when counting words in a richtext editor
- Added localized methods for DE, NL and PT, removing the dateDE and numberDE methods (use messages_de.js and methods_de.js with date and number methods instead)
- Fixed remote form submit synchronization, kudos to Matas Petrikas
- Improved interactive select validation, now validating also on click (via option or select, inconsistent across browsers); doesn’t work in Safari, which doesn’t trigger a click event at all on select elements; fixes http://plugins.jquery.com/node/11520
- Updated to latest form plugin (2.36), fixing http://plugins.jquery.com/node/11487
- Bind to blur event for equalTo target to revalidate when that target changes, fixes http://plugins.jquery.com/node/11450
- Simplified select validation, delegating to jQuery’s val() method to get the select value; should fix http://plugins.jquery.com/node/11239
- Fixed default message for digits (http://plugins.jquery.com/node/9853)
- Fixed issue with cached remote message (http://plugins.jquery.com/node/11029 and http://plugins.jquery.com/node/9351)
- Fixed a missing semicolon in additional-methods.js (http://plugins.jquery.com/node/9233)
- Added automatic detection of substitution parameters in messages, removing the need to provide format functions (http://plugins.jquery.com/node/11195)
- Fixed an issue with :filled/:blank somewhat caused by Sizzle (http://plugins.jquery.com/node/11144)
- Added an integer method to additional-methods.js (http://plugins.jquery.com/node/9612)
- Fixed errorsFor method where the for-attribute contains characters that need escaping to be valid inside a selector (http://plugins.jquery.com/node/9611)
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 plugins.jQuery.com bug tracker (requires registration).
Enjoy!
Boy, you’ve been keeping busy.
Can’t wait to take it for a spin!
Will this be updated on Microsoft’s CDN soon? Thanks for your hard work!
@Elijah: I’ve pinged my contact at Microsoft about it. I’ll update the plugin page as soon as its up, and if it takes a while, post another update.
This is great, does it support simplified Chinese? I seen in the change log only traditional (just minor variations). Thanks.
Check the full list of localizations.
Yay! This update has fixed an issue I was seeing validating email addresses with Validate 1.5 and JQuery 1.3.2 (but worked fine with 1.2.3). You’re a star Jörn.
I haven’t seen it documented anywhere, but are type=’password’ fields considered required, even when not set as such?
This is causing problems in a profile update page, where a user need only enter a password if they wish to change it. Setting the field to
newpassword: { required: false}
fixes it, but I was surprised to not find it documented.I think this is also causing an issue with a confirm password field (where required:”#newpassword”), but I’m still playing with it.
Das Validator-Plugin kommt mir grad sehr gelegen, vielen Dank dafür.
Great Plug-in Jörn. We finally went live today and we are using your plug-in in all our forms at http://www.recarded.com if you want to add us to the Documentation Wiki / Sites That Use It section.
~james
Firebug 1.5.0 (and Firefox 3.5.7) give a warning on the demo and also for my own forms. This affected both plugin versions 1.5.5 and 1.6
http://jquery.bassistance.de/validate/demo/
Warning:
The ‘charCode’ property of a keyup event should not be used. The value is meaningless.
It’s annoying because it happens once per keypress and fills up the console.
Now that 1.4.2 has it’s own delegate() function, this plugin is no longer compatible. It overwrites the jquery core version and the syntax (parameter order) is also different. You mighr consider tweaking the official version to be compatible with 1.4.2
Yep, I can confirm that the Validate plugin doesn’t work with 1.4.2 because of this conflict with $.fn.delegate()
I have been using jquery-validation plug-in for small validations. In my new project I am planning to use localization feature that is available in the plug-in. But I have not found any documentation on how to use this functionality that comes with the plug-in. Any sample code would be really helpful. Tip/Suggestion/Hint would work as well
@Jatinder: Just include one of the messages_xx.js files on your page. Either just one, or write a routine to select the right file based on the user’s locale.