<% # headmin/forms/validation # # ==== Options # * +form+ - Form object # * +attribute+ - Name of the attribute of the form model # # ==== Examples # Basic version # <%= render 'headmin/forms/validation', form: form, attribute: attribute %#> show_feedback = form.object && !form_field_valid?(form, attribute) id = form_field_validation_id(form, attribute) message = form.object&.errors[attribute]&.join(', ') %> <% if show_feedback %>
<%= message %>
<% end %>