开发者

What is a valid email address for the input type email for HTML5?

I was wonderin开发者_如何学Gog what is a valid email address for the input type=email for HTML5.


Here's the definition used by w3.

joe@example.com is a valid email address for the input type=email for HTML5.


a valid email in input type=email, is anything that matches the user/default set pattern

default pattern is: 1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )

refer to the spec for details - http://www.w3.org/TR/2010/WD-html-markup-20101019/input.email.html


Any string which passes the regular expression test for

    /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜