changing behavior of on_error_message and field errors
February 4, 2010 • Ruby on Rails • Comments
Ruby on Rails provides a nice way to display error_messages; just by adding form.error_messages you get a nice overview of all your errors.
But i prefer to have it in different ways, so i 1) dont want the on_error_message-output to be a div element, 2) further i want to give each input field having bad content to be marked – by adding an error-class to that specific element for example.
Since i had to figure it out, here are the results for changing both.
1) different element instead of a div at on_error_message?
[More]