4 ms·
yep, thats why we do a check for a min of 5 chars: a@a.a edit: the regex should pick this up by default anyway, given its looking for .+ and not .*, but my va
by fein 14y ago
yep, thats why we do a check for a min of 5 chars:
a@a.a
edit: the regex should pick this up by default anyway, given its looking for .+ and not .*, but my validation libs have the min and max length built in as well.
- micampe 14y agoI meant to ask if they are valid in the IETF sense, not in your regex. Turns out that single letter second level domains are allowed but they are reserved in some TLDs http://en.wikipedia.org/wiki/Single-letter_second-level_domain http://en.wikipedia.org/wiki/Single-letter_second-level_doma... On the other hand, no single letter TLD exists http://data.iana.org/TLD/tlds-alpha-by-domain.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt And I also just found out in that list that there are IDN TLDs (see punycode toward the end of the list), I didn’t know that. Full decoded list: http://mct.verisign-grs.com/convertServlet?input=XN--0ZWM56D%0D%0AXN--11B5BS3A9AJ6G%0D%0AXN--3E0B707E%0D%0AXN--45BRJ9C%0D%0AXN--80AKHBYKNJ4F%0D%0AXN--80AO21A%0D%0AXN--90A3AC%0D%0AXN--9T4B11YI5A%0D%0AXN--CLCHC0EA0B2G2A9GCD%0D%0AXN--DEBA0AD%0D%0AXN--FIQS8S%0D%0AXN--FIQZ9S%0D%0AXN--FPCRJ9C3D%0D%0AXN--FZC2C9E2C%0D%0AXN--G6W251D%0D%0AXN--GECRJ9C%0D%0AXN--H2BRJ9C%0D%0AXN--HGBK6AJ7F53BBA%0D%0AXN--HLCJ6AYA9ESC7A%0D%0AXN--J6W193G%0D%0AXN--JXALPDLP%0D%0AXN--KGBECHTV%0D%0AXN--KPRW13D%0D%0AXN--KPRY57D%0D%0AXN--LGBBAT1AD8J%0D%0AXN--MGB9AWBF%0D%0AXN--MGBAAM7A8H%0D%0AXN--MGBAYH7GPA%0D%0AXN--MGBBH1A71E%0D%0AXN--MGBC0A9AZCG%0D%0AXN--MGBERP4A5D4AR%0D%0AXN--MGBX4CD0AB%0D%0AXN--O3CW4H%0D%0AXN--OGBPF8FL%0D%0AXN--P1AI%0D%0AXN--PGBS0DH%0D%0AXN--S9BRJ9C%0D%0AXN--WGBH1C%0D%0AXN--WGBL6A%0D%0AXN--XKC2AL3HYE2A%0D%0AXN--XKC2DL3A5EE0H%0D%0AXN--YFRO4I67O%0D%0AXN--YGBI2AMMX%0D%0AXN--ZCKZAH http://mct.verisign-grs.com/convertServlet?input=XN--0ZWM56D... I wonder how many validators fail on these.