regex: /^(.+)\@(.+)\.(.+)$/
maxlen: 254, minlen:5
Aside from sending your verification email, that's all you need.
regex: /^(.+)\@(.+)\.(.+)$/
maxlen: 254, minlen:5
Aside from sending your verification email, that's all you need.
I have never come across someone using one but it is valid. I would actually hate to see someone try to use one. I come across enough issues trying to use '+' in my gmail email address.
http://en.wikipedia.org/wiki/Email_address#Valid_email_addre...
This might not be practical in a majority of applications (you're hardly going to sign up to 3rd party services using an alias to a machine on your local network) but if you're building a generic e-mail address validation library, it's an edge case you cannot ignore.
The thing is, for every legitimate bob@ai there are millions of erroneous bob@gmail mistakes that would slip through. At the very least a warning should be presented.
super(EmailValidator, self).__call__(value)
Just tried it. It works!
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.
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_doma...
On the other hand, no single letter TLD exists 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...
I wonder how many validators fail on these.