Here goes my code ..
<label>Old Password</label>
<%= f.password_field :current_password, :class=>"myaccount_textbox" %>
<label class="error" for="current_password">
<%= validation_errors resource.errors['current_password'] %>
</label>
...........
on form-submit, with wrong password, the default validation msg - is invalid
Requirement - need to change the default msg.
devise (3.2.4) and rails 3.2.13 what I tried from link
in en.yml
en:
activerecord:
errors:
models:
user:
attributes:
current_password:
confirmation: "Password is incorrect"
Currently it's not working and I get default msg only, what changes to be done, to get this fixed?
Try:
en:
activerecord:
attributes:
user:
current_password: "Password"
errors:
models:
user:
attributes:
current_password:
invalid: "is incorrect!"
OR
devise:
failure:
invalid: 'Password is incorrect!'
Refer this link to choose the correct option for showing password incorrect message for Devise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With