Skip to content
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

Email Validations #67

Closed
eclectic-coding opened this issue Jan 26, 2022 · 3 comments
Closed

Email Validations #67

eclectic-coding opened this issue Jan 26, 2022 · 3 comments

Comments

@eclectic-coding
Copy link
Contributor

Steve,
I have been experimenting with URI::MailTo::EMAIL_REGEXP and it does not appear to be very robust.

Examples
If you create a user with the email user it fails validations as it should.

If you create a user with the email user@example it passes validations even though it is not a full email address.

Might want to consider a more robust solution.

Thanks for the great resource.
Chuck

@stevepolitodesign
Copy link
Owner

@eclectic-coding thank you for taking the time to point this out. Email validation is tricky! I think the regex that Devise uses also fails in that case too.

You'll note that the comment reads:

...It simply asserts that one (and only one) @ exists in the given string. This is mainly to give user feedback and not to assert e-mail validity.

However, I think we can do a better job of accounting for this by using the correct input type on any form that deals with an email address.

How would you feel about closing out this issue in favor of a new issue focused on using the correct input type?

@eclectic-coding
Copy link
Contributor Author

Sounds like a good approach.

@stevepolitodesign
Copy link
Owner

Closed in favor of #73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants