Express CSV Logo

Datetime

Use x.datetime() for combined date and time values.

x.datetime().label("Created At")

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.

output

Sets the output format template.

.output(template: string)

  • template sets the output format template, e.g., "yyyy-MM-dd HH:mm:ss" or "MMM d, yyyy h:mm a".

allowOffset

Allows timezone offsets in the input.

.allowOffset(options?: { message?: string })

  • message overrides the validation error text, e.g., "Timezone offsets are required".

On this page