News for hackers. Stuff that matters.
Re:Stop validating email addresses with your complex regex by justincormack on Thursday September 06, 2012 @05:51PM (#4486472)
There used to be someone who had the email address john@dk (maybe it wasnt john). Mx records on tlds are frowned upon but not technically invalid.
Re:Stop validating email addresses with your complex regex by imperialWicket on Thursday September 06, 2012 @07:59PM (#4486970)
This is precisely the reason why you let the user bypass your check with a confirmation. It's likely that most of your users who enter something without a period made a mistake. If someone is using an address like 'john@dk', I think they'd expect a message saying 'your email is invalid'; and seeing a message that just says, 'are you sure?' with a 'yes' option would be perfectly acceptable.

Edit: sorry for the echo, bigiain - I saw your post right after adding the comment.

Re:Stop validating email addresses with your complex regex by fhars on Thursday September 06, 2012 @06:01PM (#4486512)
There is an MX record for ai, so the dot after the @ is strictly not required:

  ;; ANSWER SECTION:
  ai.			14400	IN	MX	10 mail.offshore.ai.

  ;; ADDITIONAL SECTION:
  mail.offshore.ai.	14400	IN	A	209.59.119.34
Re:Stop validating email addresses with your complex regex by eli on Thursday September 06, 2012 @06:15PM (#4486569)
Yeah, good luck to whoever uses that address. I would expect many MTAs to have problems delivering to that, let alone web form validation.
Re:Stop validating email addresses with your complex regex by nnnnnnnn on Thursday September 06, 2012 @10:20PM (#4487399)
Which MTAs do you suspect wouldn't deliver it? I've used internal zones of that form extensively without issue on all the common OSS MTAs (postfix, sendmail, exim).

I'm unaware of any common MTA software which wouldn't handle it.

Re:Stop validating email addresses with your complex regex by eli on Thursday September 06, 2012 @10:49PM (#4487482)
Several of the hosted ESPs I used couldn't handle .aero and .mobi at the time they came out.
Re:Stop validating email addresses with your complex regex by bigiain on Thursday September 06, 2012 @07:57PM (#4486966)
imperialWicket's approach would still work fine in that case when john@dk clicks the "Yes, that's really my email adress" button - and I suspect he'd be pleasantly surprised to see it work, I'll bet he's got a very high expectation of that address failing completely on most websites...

I have a cow-orker who's first name is "G" - he's very used to poorly-validating websites claiming that his firstname is "wrong".

Re:Stop validating email addresses with your complex regex by weel on Thursday September 06, 2012 @10:51PM (#4487485)
Been a long time since I last saw "cow-orker". Or USENET, for that matter...
Re:Stop validating email addresses with your complex regex by eru on Thursday September 06, 2012 @09:58PM (#4487339)
Given by his parents?
Re:Stop validating email addresses with your complex regex by bigiain on Thursday September 06, 2012 @11:02PM (#4487513)
Yup.

I've got another friend/acquaintance who's got a fully legal (self chosen) single name. No first/middle/last name, just a "mononym". He has the expected hilarious outcomes with things like Google's "real name policy".

Re:Stop validating email addresses with your complex regex by btilly on Friday September 07, 2012 @03:34AM (#4487983)
A prominent example of an interesting name is Caterina Fake.
Re:Stop validating email addresses with your complex regex by gadders on Friday September 07, 2012 @09:34AM (#4488916)
He? So it's not Cher?
Re:Stop validating email addresses with your complex regex by bigiain on Saturday September 08, 2012 @04:38AM (#4492593)
Nope. Can't even claim "acquaintance" whth Cher. Or Prince.
Re:Stop validating email addresses with your complex regex by vidarh on Friday September 07, 2012 @06:58AM (#4488478)
One of the guys that managed the Norwegian (no.) USENET hierarchy and used to be responsible for newsgroup creation for it used to go under the nickname Dr. No. Whether because of the no prefix on the hierarchy, or because people liked to complain about it whenever he rejected a proposed group, I don't know. But people repeatedly suggested campaigns to get the .no NIC to let him have the address dr@no. Never got anywhere though.
Re:Stop validating email addresses with your complex regex by Erwin on Thursday September 06, 2012 @06:40PM (#4486666)
The dk zone still has an A record (as one of the few?), so http://dk./ is a working web site name (though it redirects the the longer official Danish NIC).
Re:Stop validating email addresses with your complex regex by weel on Thursday September 06, 2012 @10:52PM (#4487487)
Doesn't work from here. Wonder if maybe the local DNS server isn't happy with it.
Re:Stop validating email addresses with your complex regex by justincormack on Friday September 07, 2012 @03:44AM (#4488013)
Chrome at least does not allow this. Curl may be a better test...
Re:Stop validating email addresses with your complex regex by mike-cardwell on Friday September 07, 2012 @07:07AM (#4488495)
Works fine here in Chrome. Are you sure you're entering http://dk/ and not just dk? The latter will trigger a search instead.