Skip to content


update field_error_proc leads conflict by change field_error_proc #985

halida opened this Issue · 4 comments

3 participants


in :

ActionView::Base.field_error_proc = { |html_tag, instance| html_tag }

but in my application, I'm using client_side_validations, it use it to update form with error:

 ActionView::Base.field_error_proc = do |html_tag, instance|
   unless html_tag =~ /^<label/
     %{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
     %{<div class="field_with_errors">#{html_tag}</div>}.html_safe

form_builder override my configuration, or my configuration override form_builder, any way to fix it?


Yeah, the only solution I can think is a wrapper like:

field_error_proc is a total design failure (what was the guy thinking???)...

If you want to implement the aforementioned hack, RA form_builder is here:

Have fun!


my solution, is to fork rails_admin, and delete field_error_proc:

works for me.


This should be fixed. This can be an issue for other libraries/code.

@bbenezech bbenezech was assigned
@bbenezech bbenezech added a commit that closed this issue
@bbenezech bbenezech fix #985
shamelessly copied from simple_form
@bbenezech bbenezech closed this in 909e4a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.