sagalbot / vue-select

Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.
https://vue-select.org
MIT License
4.62k stars 1.33k forks source link

feat: adding `required` property to input attributes #1690

Closed SantosDiv closed 1 year ago

SantosDiv commented 1 year ago

Added the required property to delegate to the component itself the responsibility of understanding how to define this characteristic. This makes required easier to use, making it similar to the select tag in HTML.

image

netlify[bot] commented 1 year ago

Deploy request for vueselect pending review.

Visit the deploys page to approve it

Name Link
Latest commit be023300ddafff909acf9651e8a8dd648ad8910a
sagalbot commented 1 year ago

Unfortunately this won't work. The search input doesn't actually bind a value from the options, its value is the search string. For this to work, it'd have to be implemented this way: https://vue-select.org/guide/validation.html?#required