Skip to content

Commit

Permalink
Use I18n strings if available
Browse files Browse the repository at this point in the history
Like #67 but I18n is used on Rails' side
  • Loading branch information
fauno authored and afair committed Jul 1, 2021
1 parent 5471bef commit d899f66
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 d899f66

Please sign in to comment.