You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A valid email address list is a set of comma-separated tokens, where each token is itself a valid email address. To obtain the list of tokens from a valid email address list, an implementation must split the string on commas.
jQuery.validator.addMethod(
"multiemail",
function(value, element) {
if (this.optional(element)) // return true on optional element
return true;
var emails = value.split(/[;,]+/); // split element by , and ;
valid = true;
for (var i in emails) {
value = emails[i];
valid = valid &&
jQuery.validator.methods.email.call(this, $.trim(value), element);
}
return valid;
},
jQuery.validator.messages.email
);
I'm happy to be able to define a custom method, but would like this support out of the box. As a user of an open source project that includes this library, I prefer this support be included instead of having to fork someone else's project code.
The text was updated successfully, but these errors were encountered:
This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automatically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up.
Thank you for contributing :)
Quote from whatwg HTML5 spec:
There are many examples around the internet of custom methods to add this support. For example, from Leniel Maccaferri on stack overflow
I'm happy to be able to define a custom method, but would like this support out of the box. As a user of an open source project that includes this library, I prefer this support be included instead of having to fork someone else's project code.
The text was updated successfully, but these errors were encountered: