# cellValidationFailed

Emitted when validation fails. Use the target cell, input, and message to guide corrections.

Canonical: https://grid.syidax.com/docs/events/cellValidationFailed/

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

## What does this API do?

Emitted when validation fails. Use the target cell, input, and message to guide corrections.

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

## Exact input and result types

```typescript
cellValidationFailed: { rowIndex: number; field: string; value: unknown; message: string }
```

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

## Usage flow

Subscribe with grid.addEventListener('cellValidationFailed', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.

```javascript
const controller = new AbortController();
grid.addEventListener('cellValidationFailed', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

<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.
