Skip to content

Commit

Permalink
Use I18n strings if available
Browse files Browse the repository at this point in the history
Like afair#67 but I18n is used on Rails' side
  • Loading branch information
fauno committed Feb 23, 2021
1 parent 1e5a2ed commit 88225e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/email_address/active_record_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def validate_email(r,f)
e = Address.new(r[f])
unless e.valid?
error_message = @opt[:message] ||
Config.error_messages[:invalid_address] ||
Config.error_message(:invalid_address, I18n.locale.to_s) ||
"Invalid Email Address"
r.errors.add(f, error_message)
end
Expand Down

0 comments on commit 88225e2

Please sign in to comment.