Multiselect
Multiselect fields use x.multiselect(options) for multiple selections from a fixed list. Each option supports label, value, and optional alsoMatches values just like x.select().
columnNameAliases
Adds alternate CSV header names for this field.
.columnNameAliases(aliases: string[])
aliaseslists header names that should map to this schema key.- Aliases are used during column matching alongside the field key and label. Use option
alsoMatchesfor alternate cell values.
label
Sets the user-facing label shown in the importer.
.label(text: string)
textsets the label text.
description
Sets help text shown below the field.
.description(text: string)
textsets the description text.
optional
Allows the field to be empty.
.optional()
- Empty optional values are delivered as
null. - The row object still includes the field key, e.g.,
{ teams: null }.
default
Available after .optional().
.default(defaultValue: unknown | (() => unknown | Promise<unknown>))
defaultValuecan be a static value or a function used when the field is empty.- Defaults apply to missing values,
null, empty strings, and whitespace-only strings. - When a default is used, it is returned directly instead of validating or refining the empty value.
caseSensitive
Controls whether option matching is case-sensitive.
.caseSensitive(enabled?: boolean)
enabledenables or disables case-sensitive matching.
min
Sets the minimum number of selections.
.min(min: number, message?: string)
minsets the minimum number of selections.messageoverrides the validation error text, e.g.,"Select at least 2 teams".
max
Sets the maximum number of selections.
.max(max: number, message?: string)
maxsets the maximum number of selections.messageoverrides the validation error text, e.g.,"Select no more than 5 tags".