Synchronous cell validator
Attach a synchronous validator function to a column. The function runs when a cell value is committed and returns null or an error object. This is the foundation that every other validation feature builds on, and it keeps invalid data visible instead of discarding it silently.
Planned. This page shows the specification from issue #195. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Products grid with 10 rows. The Quantity column has a validator that requires an integer of 0 or more.
Expected behavior
Committing -3 marks the cell invalid and emits cellValidationChange with the error key 'min'. Changing the minimum input re-validates all visible cells. When the validator is turned off, all Quantity errors are cleared.
Planned API surface
columns[].validatorsValidatorFnValidationErrorcellValidationChangegetCellErrors()validateCell()Acceptance criteria
- The validator runs exactly once per commit. (pending)
- A null return clears any existing error for that cell. (pending)
- The invalid value is retained unless 'revert on invalid' is enabled. (pending)
- getCellErrors(rowId, field) returns the current errors. (pending)
- The event payload contains rowId, field, value and errors. (pending)