How can I change the message "Password does not match confirmation"

I know that in config / en.yml I can change the message "this letter has already been accepted" by modifying the en.yml file:

en: hello: "Hello world" ActiveRecord: errors: Messages: accepted: "este mail ya sido utilizado"

but how can I change the message "Password does not match confirmation". I tried using the confirmation password and other combinations, but it does not work! thanks in advance.

+5
source share
2 answers

These error messages are related to activerecord .

Just create a new language file with this structure and replace what you need.

activerecord:
  errors:
    messages:
      confirmation: "does not match"

en.yml, . . i18n http://guides.rubyonrails.org/i18n.html

+10

Rails 4.0.2

I18n.translate("errors.messages.confirmation")
  => "doesn't match %{attribute}"

, :

en:
  errors:
    messages:
      confirmation: "%{attribute}s don't match - please check"
+1

All Articles