Giter VIP home page Giter VIP logo

Comments (7)

PhiLhoSoft avatar PhiLhoSoft commented on August 24, 2024

Perhaps with a custom validator.

from angular-selectize.

Bana0615 avatar Bana0615 commented on August 24, 2024

i mean using this directive its self...theres a max so shouldnt there be a min it would make things alot easier especially if i am using this for a single select and i want it to be required.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on August 24, 2024

You should add the required attribute to your selectize component, and manage it like any required field in your form.
Somehow, it is not something that can be managed at the component level, it is about the state of the form itself.

from angular-selectize.

Bana0615 avatar Bana0615 commented on August 24, 2024

That's true. But what if I have a mutli select and want to them to select
at least 3 options
On Apr 29, 2015 8:21 AM, "Philippe Lhoste" [email protected] wrote:

You should add the required attribute to your selectize component, and
manage it like any required field in your form.
Somehow, it is not something that can be managed at the component level,
it is about the state of the form itself.


Reply to this email directly or view it on GitHub
#50 (comment)
.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on August 24, 2024

Back to custom validator... Again, nothing prevents the user to select two options, fill other fields of the form, then go back to the combo to add another option.
It is the responsibility of the form to ensure it is valid, and prevent submitting. The best the component can do is to report it isn't valid according to your validator rules. Which can be more complex (eg. select at least two items above a given price, whatever).

from angular-selectize.

Bana0615 avatar Bana0615 commented on August 24, 2024

ok then you can close this issue. i was just trying to help this get as
close to the jquery version of selectize as possible.

On Wed, Apr 29, 2015 at 9:07 AM, Philippe Lhoste [email protected]
wrote:

Back to custom validator... Again, nothing prevents the user to select two
options, fill other fields of the form, then go back to the combo to add
another option.
It is the responsibility of the form to ensure it is valid, and prevent
submitting. The best the component can do is to report it isn't valid
according to your validator rules. Which can be more complex (eg. select at
least two items above a given price, whatever).


Reply to this email directly or view it on GitHub
#50 (comment)
.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on August 24, 2024

Note: I am just a simple user like you, trying to help others, and the project owner by answering to issues. So I can't close the issue.
I think you can close it yourself: I think the project owner is busy elsewhere and currently can't answer to requests.

Note: what do you mean by "get as close to the jquery version of selectize as possible"? I don't think that Selectize can do what you ask for, no?

from angular-selectize.

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.