-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative gem: email_address #58
Comments
Thanks! You are correct in that The "local-part" (username) characters in an email address should be limited to only Yes, I have read The 100% correct way to validate email addresses and just simply disagree with the general "epiphany". While "send your users an activation email" is indisputably the best way to validate a users email address, what happens to other email address that aren't provided as part of user registration; one to which a confirmation/validation email should not be sent? What about parsing emails from another source than typed user input? A field validator has more reason for existence than to check for a user's typos. FWIW, I use my fork of this repo (at a much earlier version) which implements a much more strict interpretation of a "valid" email address (e.g: |
Hi 👋 ,
We've been using this gem for a while, then we started getting some "hackerish" invalid emails in our database as a result we had to look for alternative validations. At first we used the Ruby built-in regex
URI::MailTo::EMAIL_REGEXP
but this one has some use cases where it does not work with a valid email.Looking at the source code I am under the impression this gem's regex is very simplistic "no spaces" plus "@ symbol" followed by "no spaces". That may result in invalid emails, also allows for stuff like
<script>alert()</script>@domain.com
.I would like to promote this alternative https://github.com/afair/email_address that includes a Rails validator and has some other goodies like emails types, hashing, etc.
Thanks for sharing your project 💜
The text was updated successfully, but these errors were encountered: