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

Don't set required and aria-required for attributes with conditional presence validators #685

Closed AndersGM closed 1 year ago

AndersGM commented 1 year ago

After the nice addition in: https://github.com/bootstrap-ruby/bootstrap_form/pull/664 I've run into issues with attributes that have conditional presence validators (:if and :unless). This PR fixes that, so the required HTML-attributes are only added when we are sure the attributes are always required.

donv commented 1 year ago

Thanks!

AndersGM commented 1 year ago

@donv Would it be possible to make a new release with this fix? :-)

donv commented 1 year ago

Done.