Rails form error class Posted on 08.05.201308.05.2013 by stex This field_error_proc adds the class “error” to all invalid fields in a rails form. It needs the Nokogiri gem to be installed which is used to parse the HTML elements. View the code on Gist. In combination with the bootstrap css, the result might look like this: