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

Emails with spaces in front/after are passed as valid #61

Closed
nesrual opened this issue Feb 20, 2016 · 0 comments
Closed

Emails with spaces in front/after are passed as valid #61

nesrual opened this issue Feb 20, 2016 · 0 comments

Comments

@nesrual
Copy link

nesrual commented Feb 20, 2016

It seems like valid email addresses with spaces in front / after are passed as valid.

2.3.0 :001 > ValidatesEmailFormatOf::validate_email_format(" invalid@github.com ")
 => nil
2.3.0 :002 > ValidatesEmailFormatOf::validate_email_format(" invalid@github.com")
 => nil
2.3.0 :003 > ValidatesEmailFormatOf::validate_email_format("invalid@github.com ")
 => nil
2.3.0 :005 > ValidatesEmailFormatOf::validate_email_format("invalid@github.com this will fail")
 => ["does not appear to be a valid e-mail address"]

It might be a good idea to trim email addresses before validation.

alexdunae added a commit that referenced this issue May 31, 2022
This should be done in the user's application, not the gem

Fixes #61
Fixes #72
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

1 participant