3
votes

Using the Devise GEM, when a user password is reset they are allowed to set a new password. If the entered passwords do not match or if the password is too short, you get default messages:

•Password doesn't match confirmation

•Password is too short (minimum is 8 characters)

How/where can I change the text of these error messages?

1
actually the messages you want aren't there look at this link stackoverflow.com/questions/9330821/…Sam
Yep, the messages shown are actually from activerecord as the accepted answer shows.Justin

1 Answers

17
votes

Add this to your config/locals/en.yml and change it to what you want

en:
  activerecord:
    errors:
      models:
        user:
          attributes:
            password:
              confirmation: "Password does not match"
              too_short: "is too short (minimum is %{count} characters)"
    attributes:
      user:
        password: "Password"