How do I output the full error message of a field using simple form? The equivalent of rails: <%= RESOURCE.errors.full_messages %>
e.g. show this:
"Email has already been taken",
"Password confirmation doesn't match Password",
"Password is too short (minimum is 8 characters)"
instead of: f.error_notification
"has already been taken",
"doesn't match Password",
"is too short (minimum is 8 characters)"
simple_form (3.0.2)/Rails 4.1.1
If anyone is still wondering there is an easy way to do this now, as referenced here
Simply under config/initializers/simple_form.rb
change b.user :error
to b.user :full_error
and now your error messages will be the equivalent of RESOURCE.errors.full_messages
Note: if you are using bootstrap w/ simple form you change simple_form_bootstrap.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With