I am using devise to handle authentication. Overall I like it, but I'd like to customize the error display a bit. Right now I've got the following in my view.
<div class="field <% if resource.errors[:email].present? %>error<% end %>">
<%= f.label :email, "Email:" %><br />
<% if resource.errors[:email].present? %>
<ul>
<% resource.errors[:email].each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
<% end %>
<%= f.text_field :email, :class => "text" %>
</div>
But when there is a problem with the email, the message displayed is as follows: is invalid
. That's not very user friendly, but I can't find where this message is being set. It doesn't appear to be in devise.en.yml, but perhaps I'm overlooking something.
Any idea where I can customize the error messages?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…