开发者

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

开发者 https://www.devze.com 2023-02-17 03:32 出处:网络
I was wonderin开发者_如何学Gog what is a valid email address for the input type=email for HTML5.Here\'s the definition used by w3.

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

精彩评论

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