Hacker News new | past | comments | ask | show | jobs | submit login

Why not use a librairy that validates emails? You save time, and you actually accept valid emails.

I agree that the example with a lot of symbols is over the top, but when a website doesn't accept foo+bar@host.com, I assume the product will be sub-par quality wise. The author did not follow of rigorous process for something as simple as email validation, I doubt he'll be more rigorous in other parts of his project.




There are other concerns too. I submitted a bug report to Zappos because their emailer did not URL-escape '+' in foo+bar@example.com. Resulting in:

  http://www.zappos.com/?email=foo+bar@example.org
which was treated as:

  http://www.zappos.com/?email=foo%20bar@example.org
by the browser. It worked fine when I manually encoded the '+'.


I've given up on using + addresses. As other people have pointed out, the worst thing about them is that sometimes you will find that it works initially but will break other parts of the application now or later. For example, account creation works fine, but in two years, you can no longer log in.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: