Live data from Hacker News

Email address validation: please stop

blog.sinjakli.co.uk

31–40 of 86 posts

Re: Email address validation: please stop

#32
post #14

There are two separate issues going on here. One: validating addresses to catch typos. A common example is typing a comma instead of a dot or typing just a username instead of a whole email address. Flagging these errors is a good thing. Two: some developers believe that they can make people enter real email addresses by being very clever about only accepting strings that look like real email addresses. This is stupi…

Re "Two", if you choose an email address that doesn't look like an email address and it gets blocked then I'm not sure that it is the developer [alone] who is being stupid.

Re: Email address validation: please stop

#33
While we're on the topic of emails, does anyone have any anecdotes or data on how often users will click activation links if I log them in after registration?

I always hated having to log in to my email after signing up, so I just create an account and login users without any upfront verification.

My email to the user says I will disable accounts that are not activated in 4 days, but its just a bluff :)

Re: Email address validation: please stop

#34
post #8
post #3

On the other hand, maybe the specification for email addresses is too loose.

Maybe. I all know is that no one should have to write a regexp like this one http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html

I believe that misses some edge cases as well.

Re: Email address validation: please stop

#35
You should first ask yourself if you really need an email address. And see if you can get away with not having one.

Requiring that the user have an email on file is not as necessary a requirement as a lot of people seem to think. It seems like half the time or more, they just want to spam it anyway.

Re: Email address validation: please stop

#36

I like the idea of having validation but when the email doesn't match your pattern, give the user a warning that says "sorry, we don't think this is correct" but allow them to continue if they think it's legit, then have them click a link to validate so an incorrect email serves 0 purpose for them.

The point here is that "the pattern" used by developers is often grossly incorrect. It'd be better to not even attempt to enforce any pattern.

Re: Email address validation: please stop

#37

I like the idea of having validation but when the email doesn't match your pattern, give the user a warning that says "sorry, we don't think this is correct" but allow them to continue if they think it's legit, then have them click a link to validate so an incorrect email serves 0 purpose for them.

This is a very good practice.

I've been working on a large project that takes this approach for more than just email verification. We try to validate required information of multiple types (emails, accounts, etc.), and provide a "Move forward without validating" option after a third unsuccessful attempt. It's made for quite a better user experience overall, reducing the frustration of users sure they're submitting correct data while "the computer" thinks it's wrong, allowing them to complete the process nonetheless.

Re: Email address validation: please stop

#38
I never understood the point of enforcing the spec for user input. Even if done properly it may reject some working, but invalid email addresses. And it does nothing to increase your chances of getting a good email address. Your user is either willing to give you their real address or not. If they are willing, validating fully does not protect against typos and if they are not you will get a well formattd fake address - validating to spec serves no purpose and possibly harms. Just don't do it.

Check for an @ sign and possibly a top level domain name (at leasr one dot) and be done with it.

Re: Email address validation: please stop

#39
post #27

While I agree that some kinds of validation are 'too eager' and annoying, just use a 'legit' e-mail address, ffs. By including super-special characters and whatever extra features GMail or whoever provides, you're just asking for it, sorry. Especially if you're a coder yourself, you can already assume that even if it passes the initial validation, it probably won't be properly stored or escaped when the actual mail i…

How can other people work out what you mean by a 'legit' email address? Are hyphens allowed? What about dots, underscores or numbers? Do any of those count as "super-special characters"? Just like "+", they are all permitted in standards-compliant email addresses, but I have no way of knowing whether they are permitted in addresses that you consider "legit".

Exactly. You have no way of knowing what all the code along the way between the mail-sending application and your inbox does, that was my whole point.

Re: Email address validation: please stop

#40

I like the idea of having validation but when the email doesn't match your pattern, give the user a warning that says "sorry, we don't think this is correct" but allow them to continue if they think it's legit, then have them click a link to validate so an incorrect email serves 0 purpose for them.

The point here is that "the pattern" used by developers is often grossly incorrect. It'd be better to not even attempt to enforce any pattern.

Optimize for a few hundred spam obsessed power users, or, prevent a major cause of the #2 most common CS complaint at many businesses. This does not take much pondering.

P.S. Trivially A/B testator at high volumes if your CS infrastructure is capturing sufficient data.

Post reply on HN