Validate multiple e-mails in textarea using JQuery Validate
Fields on the site are validated using JQuery Validate: http://bassistance.de/jquery-plugins/jquery-plugin-validation/
When there's one e-mail, you simply set the class of the element to "require开发者_运维百科d email".
Now, I have a textarea where multiple emails can be entered, separated either by a comma, or a newline.
I am aware of ways of validating multiple emails using regular Javascript, and I will probably have to resort to that. But before I do, I just wanted to double check that JQuery Validate does not allow for such validations out of the box. I've looked through their docs, but I couldn't find a reference to such a feature. Am I correct in this?
JQuery validation doesnt allow such option although you can extend plugin to do that . Its already validating email you have to add extra validator and just use validation as they are doing for email/
http://riteshnayak.com/blog/2010/01/05/extending-jquery-validation-plugin-custom-validation/
http://blogs.teamb.com/craigstuntz/2009/01/15/37923/
精彩评论