# getDeepErrors

> This document is the Markdown version of [formisch.dev/methods/api/getDeepErrors/](https://formisch.dev/methods/api/getDeepErrors/). For the complete documentation index, see [llms.txt](https://formisch.dev/llms.txt).

Retrieves all error messages of a specific field or the entire form by walking through the field store and all its descendants. This is useful for displaying a summary of all validation errors within a section or the whole form.

```ts
const errors = getDeepErrors<TSchema>(form);
const errors = getDeepErrors<TSchema, TFieldPath>(form, config);
```

## Generics

- `TSchema` `extends FormSchema`
- `TFieldPath` `extends RequiredPath | undefined = undefined`

## Parameters

- `form` `BaseFormStore<TSchema>`
- `config` `GetFormDeepErrorsConfig | GetFieldDeepErrorsConfig<TSchema, TFieldPath> | undefined`

### Explanation

The `form` parameter is the form store to retrieve errors from. The optional `config` parameter scopes the collection to a specific field's subtree via a `path` (when omitted, the entire form is walked). The function walks through the field store and all its descendants to collect every validation error message.

## Returns

- `result` `[string, ...string[]] | null`

## Related

### Primitives

[`useForm`](/react/api/useForm.md)

### Methods

[`getErrors`](/methods/api/getErrors.md), [`getDeepError`](/methods/api/getDeepError.md), [`getDeepErrorEntries`](/methods/api/getDeepErrorEntries.md), [`validate`](/methods/api/validate.md), [`setErrors`](/methods/api/setErrors.md)
