# getValidationErrors

Reads row, field, value, and message information for current validation errors. Connect to save guidance or an error list.

Canonical: https://grid.syidax.com/docs/methods/getValidationErrors/

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

## What does this API do?

Reads row, field, value, and message information for current validation errors. Connect to save guidance or an error list.

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

## Exact input and result types

```typescript
getValidationErrors(): Promise<
    Array<{ rowIndex: number; rowId: unknown; field: string; value: unknown; message: string }>
  >
```

| Arguments | Required | Type |
| --- | --- | --- |

The return type is `Promise<
    Array<{ rowIndex: number; rowId: unknown; field: string; value: unknown; message: string }>
  >`.

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

## Usage flow

After registering and initializing the Grid element, call grid.getValidationErrors(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

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