Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

addMethod Message Localization


Project:Validation
Version:1.5.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

You should be able to localize messages for dynamically added methods. Currently, it is possible to add custom method messages to the messages object but calling addMethod stomps previous entries even if no message is passed.

I would like to be able to omit the message argument in the addMethod call and have any previously defined messages for that method survive. Today, they will be overwritten with undefined. The following change effects the desired behavior.

addMethod: function(name, method, message) {
...
$.validator.messages[name] = message || $.validator.messages[name];
...
}

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#1

Status:active» fixed

Fixed in http://dev.jquery.com/changeset/6376

#2

Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.