开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜