Giter Site home page Giter Site logo

Required field about vue-next-select HOT 3 CLOSED

ilyen85 avatar ilyen85 commented on July 18, 2024
Required field

from vue-next-select.

Comments (3)

ilyen85 avatar ilyen85 commented on July 18, 2024 1

Hi!

Thank you for the example, yes I have managed to solve it with some JS validation, its just a nice to have feature ;) but I understand that styling a select element is hard. I have understood the limitation and thank you for your answer.

Should I close this issue?

Thank you!

from vue-next-select.

soc221b avatar soc221b commented on July 18, 2024

The required is not yet implemented.

I will fix this weekend.

Ref: https://html.spec.whatwg.org/multipage/form-elements.html#attr-select-required

Thanks for the feedback 👍 .

from vue-next-select.

soc221b avatar soc221b commented on July 18, 2024

@ilyen85

Since vue-next-select is not implemented base on native select, there is a trade-off between supporting html validation and a lot of other features (e.g., styling select, Object options).

Instead of use native html required attribute I would first recommend you to use vuelidate to do validation, I have create an example for this: https://github.com/iendeavor/vue-next-select/blob/develop/examples/src/views/Vuelidate.vue .

Hope this helps you!

from vue-next-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.