Commit 25df24bdec3457887bcb925b0abb62d08eefc235
1 parent
8c209a65
Exists in
staging
and in
42 other branches
change_password: more humanized error message.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/change_password.rb
... | ... | @@ -55,7 +55,7 @@ class ChangePassword < Task |
55 | 55 | unless data.field.blank? || data.value.blank? |
56 | 56 | user = data.user_find |
57 | 57 | if user.nil? |
58 | - data.errors.add(:value, _('is invalid for the selected field.')) | |
58 | + data.errors.add(:value, _('"%s" is not a valid %s.') % [value.to_s, human_attribute_name(data.field)]) | |
59 | 59 | end |
60 | 60 | end |
61 | 61 | end | ... | ... |