HTML5 Email Input Pattern Attribute

前端 未结 17 1021
时光取名叫无心
时光取名叫无心 2020-11-30 20:09

I’m trying to make a html5 form that contains one email input, one check box input, and one submit input. I\'m trying to use the pattern attribute for the email input but I

17条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-30 20:27

    One more solution that is built on top of w3org specification.
    Original regex is taken from w3org.
    The last "* Lazy quantifier" in this regex was replaced with "+ One or more quantifier".
    Such a pattern fully complies with the specification, with one exception: it does not allow top level domain addresses such as "foo@com"

    
    

提交回复
热议问题