API reference: @salmonui/data-grid/engine
CompiledValidatorinterface
import type { CompiledValidator } from '@salmonui/data-grid/engine';Also exported from @salmonui/data-grid/engine/validation.
interface CompiledValidator {
readonly required: boolean;
validate(value: unknown, row: unknown): readonly string[];
readonly custom: AsyncCheck | null;
}
One column's compiled rules.
| Name | Signature | Description |
|---|---|---|
required | readonly required: boolean; | True when a |
validate | validate(value: unknown, row: unknown): readonly string[]; | Synchronous built-in rules: the first failing message, as a one-element array, or |
custom | readonly custom: AsyncCheck | null; | Custom validators: a message, null, or a promise of either. Null when the column has no custom rule. |