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.
views:
29answers:
1
+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
2010-02-05 14:02:43
Thanks for the answer.
SeasonedCoder
2010-02-08 03:00:00
No problem, glad it helped
Jonathan
2010-02-08 13:57:22