Rails displays all validation error messages associated with a given field. If I have three validates_XXXXX_of :email, and I leave the field blank, I get three
validates_XXXXX_of :email
I wrote a custom helper
def display_error(field) if @user.errors[field].any? raw @user.errors[field].first+"" end end
and then I use it in view under the text field like so
<%= display_error(:password) %>