views:

29

answers:

1

On my login form I want to display one simple error message like "Sorry, email or password is invalid" whenever user enters invalid email and / or password; instead of standard fancy message with heading and unordered list.

+3  A: 

This work for you

<% if user_session.errors %>
   <p>Sorry, email or password is invalid</p>
<% end %>

Remove the: <%= f.error_messages %>

If your user_session object does more specific validation you can make the if statement more specific.

Jonathan
Thanks for the answer.
SeasonedCoder
No problem, glad it helped
Jonathan