开发者

Email Validation to accept all special character

I've regular expression to validate the email address as below

var reg = /^([A-Za-z0-9_\-\+\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;

please help me to validate the entered email so that the input box should accept all special characters listed below.

 .!#$%^&*-=_+{}|/?开发者_如何学编程`

thanks in advance


E-mail addresses are barely worth validating as legitimate e-mail addresses can contain almost anything (why would you want to tell someone their e-mail address is not valid?). The only way to be sure anyway will be to send them an e-mail with a confirmation link in it. The fact of the matter is if you don't want to exclude any possibly valid e-mail addresses you'll end up with something really permissive like this: \w+\@\w+.\w+

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜