Rails simple_form: disable error labels

pbonnell picture pbonnell · Jun 23, 2011 · Viewed 10.5k times · Source

I'm trying to stop simple_form from adding error labels entirely.

tried this css :

label.error {display:none;}

but SimpleForm javascript is setting to display:block; when it's generated.

Am I missing a config that lets me turn off generation generation entirely?

This stops them from appearing, which works for for now :

label.error {display:none!important;visibility:hidden;}

Answer

Mike Vormwald picture Mike Vormwald · Jul 9, 2011

Give this a try: (according to the source on github this should disable error messages!)

<%= f.input :password, :error => false %> 

If you want to disable for ALL fields, I believe you'd have to put this on all fields