bootstrap-ruby / bootstrap_form

Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
MIT License
1.64k stars 351 forks source link

inline validation for fields_for #656

Closed no1-knows closed 9 months ago

no1-knows commented 1 year ago

Hello! In this code, title and content fields show inline errors properly but staple_food and main_dish doesn't. Is there a mistake?

<%= bootstrap_form_with(model: @recipe_form, url: @recipe_form.persisted? ? recipe_path : recipes_path) do |form| %>

  <%= form.text_field :title %>
  <%= form.text_area :content %>

  <%= form.fields_for :genres do |g| %>
    <%= g.text_field :staple_food %>
    <%= g.text_field :main_dish %>
  <% end %>

  <%= form.submit %>
lcreid commented 1 year ago

Hi. Thanks for bringing this to our attention. Would you mind posting the HTML that this generates, and/or a screen shot of the rendered page? Thanks in advance.

donv commented 10 months ago

Hi @no1-knows !

Do you have any more information for us?