Live data from Hacker News

It's Impossible to Validate an Email Address

elliot.land

51–60 of 68 posts

Re: It's Impossible to Validate an Email Address

#51
post #12

I once heard the story of a man who helped Aruba set up their DNS (.aw) in the late 90's. In exchange, as part of his compensation, he asked for an email address at the top-level domain, and received something like js@aw, which is a perfectly functional email address, but trips up a lot of validators.

I heard this story about Ian Goldberg, Anguilla, and the obvious email address.

Re: It's Impossible to Validate an Email Address

#52
Wouldn't it be reasonable to have a sanity check that can be bypassed by the user? It is very likely to be a mistake if there's no full stop in the address, but there are exceptions [0]. I would like to see a warning if I accidentally type vostok@examplecom instead of vostok@example.com.

[0] https://mail.gnome.org/archives/evolution-list/2002-January/...

Re: It's Impossible to Validate an Email Address

#54
post #51
post #12

I once heard the story of a man who helped Aruba set up their DNS (.aw) in the late 90's. In exchange, as part of his compensation, he asked for an email address at the top-level domain, and received something like js@aw, which is a perfectly functional email address, but trips up a lot of validators.

I heard this story about Ian Goldberg, Anguilla, and the obvious email address.

It might have been Anguilla, the story was told to me a long time ago.

Re: It's Impossible to Validate an Email Address

#55
post #49
post #40

It seems there are weird things you can use in an email address that nobody does, as a result what is used and considered to be an email address has matured. If you create an email address that is weird, in practice you'll be less capable of using it. The weirder it is the fewer web forms or software you'll successfully put it into. I think we can just say no, functionally, you cannot put comments or additional @ sym…

> I shouldn't be expected to jump through the hoops necessary in order to allow "technically valid" email addresses that someone went out of their way to make, when I could more easily suggest they use a normal one. I really hope you don't work on anything important if your stance is, "I shouldn't be expected to implement specifications correctly because it's easier to only implement part of it." Why are we even havi…

Even Gmail, what I would consider a gold standard, only allows letters, numbers, and periods. So when you're done accusing me of not being someone viable for a position anywhere important maybe you should send a message outlining the same argument to Google.

Re: It's Impossible to Validate an Email Address

#56
post #55
post #49

Earlier quoted context omitted.

> I shouldn't be expected to jump through the hoops necessary in order to allow "technically valid" email addresses that someone went out of their way to make, when I could more easily suggest they use a normal one. I really hope you don't work on anything important if your stance is, "I shouldn't be expected to implement specifications correctly because it's easier to only implement part of it." Why are we even havi…

Even Gmail, what I would consider a gold standard, only allows letters, numbers, and periods. So when you're done accusing me of not being someone viable for a position anywhere important maybe you should send a message outlining the same argument to Google.

Huh, Gmail completely implements RFC5321 and you can send and receive email from any valid address, even from their web client, and they validate the email address.

I stand by my position, failing to implement the spec correctly should be considered an error even when Google does it.

If you want a compromise, how about printing "we don't support email addresses with X" if you want to be picky for SPAM detection, simplicity, or something rather than "this email address isn't valid." Google does this for some valid-but-not-accepted addresses on their signup page but it's not sophisticated enough to catch everything.

Re: It's Impossible to Validate an Email Address

#58
post #15

Let's remind the famous quote from Jamie Zawinski: "Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems." I was neglecting this quote for a long time, until I started using regular expressions in real projects...

So many routing solutions use regexes. Is that really necessary?

Re: It's Impossible to Validate an Email Address

#59
post #15

Let's remind the famous quote from Jamie Zawinski: "Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems." I was neglecting this quote for a long time, until I started using regular expressions in real projects...

I never really learned how to write regex. I can write simple ones with the use of a tool to help me figure out what I need to write (and a cheatsheet to explain the terms). I realize they could save me some future potential grief, but I'm usually more concerned with the present actual grief they cause me. I feel like I'm letting down the side.

If you start writing a lot of Unix pipelines or use Vim extensively you start to get a very strong working knowledge of regular expressions (awk can solve basically any problem, but it creates at least twice as many as it solves :P).

Re: It's Impossible to Validate an Email Address

#60
post #19

What I'm about to say is more general than regex, but can online services please stop trying to validate my email address? If I gave you an email address that you think is invalid, rest assured I did it for a reason. I'm not an imbecile: I know how to type my address correctly (especially when you make me type it twice). For all the imbeciles who don't know how to type their address correctly, the phone system still…

But, statistically speaking, it probably is an imbecile.

These systems aren't optimizing for someone like you trying to be clever. They're trying to handle the more common cases of someone typing a street address in the wrong field or forgetting the ".com" or putting in an HTTP address or some such.

They're trying to catch that, not every possible pedantically legal string you could throw at it. Maybe they could improve the validator, or maybe they'd rather be spending programmers' time on things with actual business value.

The sum total of imbeciles may well represent a bigger market than the sum total of people like you.

Post reply on HN