bluzky / nice-select2

A lightweight vanilla javascript library that replaces native select elements with customizable dropdowns
https://bluzky.github.io/nice-select2/
MIT License
370 stars 61 forks source link

HTML5 validation broken #40

Closed inc-ali closed 1 year ago

inc-ali commented 2 years ago

Unfortunately HTML5 validation is not working, if the initial select element has a required attribute, because it's hidden. The browser will fail with an error An invalid form control with name='fieldname' is not focusable.

Instead of hiding the element, we could apply a similar fix as described in https://github.com/Choices-js/Choices/issues/449.

Tsjippy commented 1 year ago

fixed as of now