开发者

server side / client side email validator differences

开发者 https://www.devze.com 2022-12-21 01:28 出处:网络
I\'m using the native jQuery validation library to validate email addresses entered in a contact form. Since this is an Expression Engine site, I\'m using its email validator as a server side backup.

I'm using the native jQuery validation library to validate email addresses entered in a contact form. Since this is an Expression Engine site, I'm using its email validator as a server side backup.

When I enter test@b.c, jQuery says it's valid but wh开发者_StackOverflow社区en submitted, the Expression Engine validator says it is not valid.

I know that validating email addresses can get very complex but which of the two results would you consider as being "correct" ?


It's a technically valid email address, but it cannot be delivered to. (There are no single-character TLDs)
Take your pick.

0

精彩评论

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