DEV Community

Discussion on: Regex for email validation in rails

Collapse
 
darkain profile image
Vincent Milum Jr

I'd highly suggest NOT using regular expressions for email address syntax validation. The RFC allows for a lot more characters and variance in the email address than what is presented in this particular regular expression, meaning you'll end up excluding some users. And worse, others unaware of this will invariably end up on this article to copy-paste your regex into their application, which will end up them excluding others without even knowing it.

davidcel.is/posts/stop-validating-...