We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72ccd90 commit c922580Copy full SHA for c922580
app/validators/devise_token_auth_email_validator.rb
@@ -3,7 +3,7 @@
3
class DeviseTokenAuthEmailValidator < ActiveModel::EachValidator
4
def validate_each(record, attribute, value)
5
unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
6
- record.errors[attribute] << email_invalid_message
+ record.errors.add(attribute, email_invalid_message)
7
end
8
9
0 commit comments