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

Fix: email format #5714

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

abdulaba
Copy link

Problem: You can register an invalid email: john.doe@gmail
Fix: Regular expresion

devise.rb

@@email_regexp = /\A[^@\s]+@[^@\s]+.[^@\s]+\z/

@rafaeldev
Copy link

Hi @abdulaba !

I figured out this point and I fixed it in devise.rb config file with:
config.email_regexp = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i

I don't remember where I saw it, but that default simple validation is for solving some local case emails

@abdulaba
Copy link
Author

abdulaba commented Sep 23, 2024 via email

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

Successfully merging this pull request may close these issues.

3 participants