View as Markdown

API reference: @salmonui/core/validation

ValidatorContextinterface

import type { ValidatorContext } from '@salmonui/core/validation';
interface ValidatorContext<Row, Column = unknown> {
    readonly rowId: RowId;
    readonly columnId: string;
    readonly column: Column;
    readonly isNew: boolean;
}

Context passed to custom validators; Column is the host's column (the Data Grid passes its compiled column).

ValidatorContext members (4)
NameSignatureDescription
rowIdreadonly rowId: RowId;
columnIdreadonly columnId: string;
columnreadonly column: Column;
isNewreadonly isNew: boolean;

True for a row added in this edit session (not yet saved).