Express CSV Logo

Multiselect

Use x.multiselect(options) for multiple selections from a fixed list. Each option supports label, value, and optional alsoMatches values just like x.select().

x.multiselect([
  { label: "Engineering", value: "eng" },
  { label: "Design", value: "design" },
  { label: "Marketing", value: "mkt" },
]).label("Teams")

columnNameAliases

Use alternate CSV headers for the same field.

.columnNameAliases(aliases: string[])

  • aliases lists the alternate column names.

label

Sets the user-facing label shown in the widget.

.label(text: string)

  • text sets the label text.

description

Sets help text shown below the field.

.description(text: string)

  • text sets the description text.

example

Sets the placeholder example value.

.example(text: string)

  • text sets the example value.

optional

Makes the field optional.

.optional()

default

Available after .optional().

.default(defaultValue: unknown | (() => unknown | Promise<unknown>))

  • defaultValue can be a static value or a function used when the field is empty.

caseSensitive

Controls whether option matching is case-sensitive.

.caseSensitive(enabled?: boolean)

  • enabled enables or disables case-sensitive matching.

min

Sets the minimum number of selections.

.min(min: number, message?: string)

  • min sets the minimum number of selections.
  • message overrides the validation error text, e.g., "Select at least 2 teams".

max

Sets the maximum number of selections.

.max(max: number, message?: string)

  • max sets the maximum number of selections.
  • message overrides the validation error text, e.g., "Select no more than 5 tags".

On this page