# isEdited

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

Checks whether a specific field or the entire form is edited by walking through the field store and all its descendants. A field is edited once its value has been changed by the user.

```ts
const edited = isEdited<TSchema>(form);
const edited = isEdited<TSchema, TFieldPath>(form, config);
```

## Generics

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

## Parameters

- `form` `BaseFormStore<TSchema>`
- `config` `IsFormEditedConfig | IsFieldEditedConfig<TSchema, TFieldPath> | undefined`

### Explanation

The `form` parameter is the form store to check for being edited. The optional `config` parameter scopes the check to a specific field's subtree via a `path` (when omitted, the entire form is checked). The function walks through the field store and all its descendants and returns `true` as soon as it finds an edited field.

## Returns

- `result` `boolean`

## Related

### Primitives

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

### Methods

[`isDirty`](/methods/api/isDirty.md), [`isTouched`](/methods/api/isTouched.md), [`isValid`](/methods/api/isValid.md)
