Skip to content
Sheetwrite

Sheetwrite / Documentation

DataValidationCondition@sheetwrite/core

Serializable condition enforced by a data-validation rule.

Serializable condition enforced by a data-validation rule.

min and max remain inclusive legacy bounds. Use comparison when the operator itself is significant; comparison and legacy bounds are mutually exclusive.

Variants 5

{
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
{
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
{
kind: "date";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
{
kind: "textLength";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
{
kind: "checkbox";
checkedValue?: CellScalar;
uncheckedValue?: CellScalar;
}

Declaration

View full TypeScript declaration
export type DataValidationCondition =
| {
kind: "list";
values: readonly CellScalar[];
allowCustom?: boolean;
}
| {
kind: "number";
min?: number;
max?: number;
integer?: boolean;
comparison?: DataValidationComparison;
}
| {
kind: "date";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
| {
kind: "textLength";
min?: number;
max?: number;
comparison?: DataValidationComparison;
}
| {
kind: "checkbox";
checkedValue?: CellScalar;
uncheckedValue?: CellScalar;
};