Skip to content

[Request] multiselect doesn't have validate option. #164

Open

Description

@renhiyama
let value = await clack.multiselect({
    message: g("Choose the features you want to include in your project"),
    options: [
      { label: "React", value: "react" },
      { label: "Preact (compat)", value: "preact" },
      { label: "Twind CSS", value: "twind" },
      { label: "Tailwind CSS", value: "tailwind" },
      { label: "API Server", value: "api" },
      { label: "Serve Static Files", value: "static" },
      { label: "Million.js", value: "million" },
    ],
validate(values){
   if(values.include("million") && !values("react")) return `You need react feature in order to chooes millionjs`;
 }
  });

The validate function isn't ran. This seems to be only there at the text() component. I really need validate option. I currently have to accept the input as-is, and then use a recursive function and conditional logic to do checking.

Activity

  1. added
    bug
    on Sep 14, 2023
  2. added
    enhancement
    and removed
    bug
    on Dec 2, 2026
  3. changed the title [-][Bug] multiselect doesn't have `validate` option.[/-] [+][feature] multiselect doesn't have `validate` option.[/+] on Dec 2, 2026
  4. changed the title [-][feature] multiselect doesn't have `validate` option.[/-] [+][Request] multiselect doesn't have `validate` option.[/+] on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions