bootstrap_form icon indicating copy to clipboard operation
bootstrap_form copied to clipboard

Error messages don't display on form_group

Open suketk opened this issue 3 years ago • 0 comments
trafficstars

I have a set of radio buttons in my form group that don't show error messages.

When there is an error, the radio buttons and respective labels turn red, but there's no message.

I can confirm there's an error because the error summary prints it, but it's not displayed by the field.

If I use errors_on, the .invalid-feedback div appears in the DOM but it's hidden because there's no CSS rule (in Bootstrap?) that matches it.

I believe this is a bug, unless I'm missing something simple.

Example below:

The associated model has a presence validation for the :test field.

<%= f.form_group :test, label: {text: 'Label'}, help: 'Help', class: 'mb-5 linear' do %>

  <%= f.radio_button :test, 1, label: 1, inline: true %>
  <%= f.radio_button :test, 2, label: 2, inline: true %>
  <%= f.radio_button :test, 3, label: 3, inline: true %>

<% end %>

suketk avatar Aug 25 '22 22:08 suketk