This adds the ability to prefix error messages through a config.wrapper option :prefix_attribute_name.
Adds support for field names in errors using config.wrapper option :p…
Can you expand a little bit more your use case for this please?
I want the "full_error" message to display on my forms like this:
The only option I see to display the full_error without this patch is to do something like this inside my form:
<%= f.full_error :token %>
The problem with this is that the error message tag is displayed outside the controls div. Am i missing something?
It seems duplication to me to have the field name in the label and in the error message. Anyway, you can achieve it with something like this:
<%= f.input :email, error: false do %>
<%= f.input_field :email %>
<%= f.full_error :email %>
<% end %>
That should give you the expected output.
That's works perfectly -- thanks!