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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ module Test
# @ symbols or whitespaces in either the localpart or the domain, and that
# there is a single @ symbol separating the localpart and the domain.
mattr_accessor :email_regexp
@@email_regexp = /\A[^@\s]+@[^@\s]+\z/
@@email_regexp = /\A[^@\s]+@[^@\s]+\.[^@\s]+\z/


# Range validation for password length
mattr_accessor :password_length
Expand Down
1 change: 1 addition & 0 deletions test/models/authenticatable_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AuthenticatableTest < ActiveSupport::TestCase
# config.strip_whitespace_keys = [:email]
test 'find_or_initialize_with_errors uses parameter filter on find' do
user = User.create!(email: "[email protected]", password: "1234567")

assert_equal user, User.find_or_initialize_with_errors([:email], { email: " [email protected] " })
end

Expand Down