yml
en
activerecord:
errors:
models:
user:
confirmation: "Passwords do not match"
but I get
"Password Passwords do not match"
how can i get rid of "Password"?
yml
en
activerecord:
errors:
models:
user:
confirmation: "Passwords do not match"
but I get
"Password Passwords do not match"
how can i get rid of "Password"?
Try this:
# config/locales/en.yml
en:
activerecord:
attributes:
user:
password_confirmation: "Passwords"
errors:
models:
user:
attributes:
password_confirmation:
confirmation: " do not match!"
The best I can give is to remove the attribute from the error message (so you only get the message) - removing field name from validation error message
This is what we use in Rails 4.0.2
:
<% resource.errors.each do |attr,msg| %>
<li><%= msg %></li>
<% end %>