Sha256: e9f1b3d26e571c5d6a5067e2557e709a00dc3c4bb1ff92179584128f2f5609c5

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

<%
  # 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.try(attribute)&.join(', ')
%>

<% if show_feedback %>
  <div class="invalid-feedback" id="<%= id %>">
    <%= message %>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
headmin-0.3.1 app/views/headmin/forms/_validation.html.erb