Skip to content

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.

2 participants