# invalidEditMode

Selects allow to apply invalid values with errors, revert to restore previous values, or block to prevent commits.

Canonical: https://grid.syidax.com/docs/options/invalidEditMode/

<a id="meaning"></a>

## What does this API do?

Selects allow to apply invalid values with errors, revert to restore previous values, or block to prevent commits.

<a id="contract"></a>

## Exact input and result types

```typescript
invalidEditMode: 'allow' | 'revert' | 'block'
```

| Item | Value |
| --- | --- |
| JavaScript name | invalidEditMode |
| HTML attribute | invalid-edit-mode |
| Default | 'allow' |
| Input type | 'allow' \| 'revert' \| 'block' |

<a id="usage"></a>

## Usage flow

Set this on a property of the Grid element. In HTML, you can also use the invalid-edit-mode attribute. Pass arrays, objects, and callbacks through JavaScript, and use new arrays or objects when applying changes.

<a id="recipes"></a>

## Feature explanations and examples

- [Data validation](https://grid.syidax.com/docs/features/validation-rules.md) — Use declarative rules to check required values, numeric ranges, string formats, and custom conditions. The default mode may only mark invalid values, so explicitly set invalidEditMode to block saving when required.
