Stop Validating Email Addresses With Your Complex Regex
1–10 of 211 posts
Re: Stop Validating Email Addresses With Your Complex Regex
#2Re: Stop Validating Email Addresses With Your Complex Regex
#3Glad I'm not the only one just checking for an '@'. I wouldn't want to prevent users from registering with my sites just because I didn't foresee some funky email address formatting with my regular expression.
Edit: Oh wait, on your own sites :-) I'm just slightly annoyed that I have to add a fqdn when doing local development with some apps...
Re: Stop Validating Email Addresses With Your Complex Regex
#4Re: Stop Validating Email Addresses With Your Complex Regex
#5Re: Stop Validating Email Addresses With Your Complex Regex
#6Re: Stop Validating Email Addresses With Your Complex Regex
#7I personally prefer: /[^@]+@[^@]+\.[^@]+/
Basically the same except that it will throw an error if someone enters an extra at sign.
Re: Stop Validating Email Addresses With Your Complex Regex
#8Saying the user will just come back and register again is not good. That's like saying if your page is very slow to load, users will just wait for it to load. They don't. They leave and never come back most of the time.
If you can't afford to write the code to help the users fill out the form in a way that will work, fine, that's something you didn't have time for considering the percentage of users it will help/retain. But don't claim it is useless.
Re: Stop Validating Email Addresses With Your Complex Regex
#9I would rather lose a few users through a faulty regexp than lose double digit percentage through an email activation step.
Re: Stop Validating Email Addresses With Your Complex Regex
#10When the regex is not RFC complaint is the worst case, for example, I want to use . or + on my mail address and the website don't allow me.