SYIDAX / DATA GRID

Data validation

Validate ranges and required input using per-column rules.

Get started
Data validationSample order data
120 rows
Loading Grid…

Options

Changes below update the Grid and code immediately.

Latest result

Edit Quantity, enter -1, and try to apply it. Quantities in this example must be at least 0.

View code
Current preview

Usage guide

#

Block values forbidden by business rules, such as negative quantities. Check both input formats and business constraints.

Try it yourself

  1. Enter a disallowed value

    Edit Quantity, enter -1, and try to apply it. Quantities in this example must be at least 0.

  2. Verify the previous value is retained

    Check that the disallowed value does not remain as a valid quantity. Numeric editor restrictions or validation rules prevent application.

  3. Enter a valid value

    Enter 25 in the same cell and press Enter. Verify quantity and total update correctly.

Expected results

Valid input is applied and out-of-range input is blocked. If validation events fire, read their reasons in the results.

Browser validation alone does not protect server data. Enforce the same business rules in the save API.

Useful terms

validationRules
A list defining which validation conditions apply to each column.
invalidEditMode: block
A setting blocking edits that fail validation.

API reference

#

Other properties2
Attribute / PropertyType / DefaultDescription
validationRules
ValidationRule[]Default: undefinedData validation. A grid-level list of per-column rules (required / number / integer / min / max / range / minLength / maxLength / pattern / oneOf / custom). A failing cell is MARKED invalid (a red state + the message as its title) — the edit is NOT blocked (the value lands, the cell flags it, spreadsheet-style by default). `invalid-edit-mode` can instead keep the editor open (`block`) or cancel/revert it (`revert`). A rejected or allowed-invalid edit fires `cellValidationFailed`. Blank passes every rule but `required`. Off by default (zero overhead).
invalidEditMode
'allow' | 'revert' | 'block'Default: 'allow'Policy for an editor value that fails `validationRules`. `allow` preserves the existing spreadsheet-style mark-and-commit behavior.
Events1
EventsDetail typeDescription
{ rowIndex: number; field: string; value: unknown; message: string }Fires when a committed edit fails a validation rule.
Methods1
Method / ArgumentsReturn typeDescription
Promise< Array<{ rowIndex: number; rowId: unknown; field: string; value: unknown; message: string }> >every cell that currently fails a validation rule, in display order. Empty when there are no rules (zero overhead). A host uses this for an error summary / "jump to next error" / a save-guard.