šŸ“„ tanstack/form/latest/docs/reference/interfaces/formstate

File: formstate.md | Updated: 11/15/2025

Source: https://tanstack.com/form/latest/docs/reference/interfaces/formstate



TanStack

Form v1v1

Search...

+ K

Auto

Log In

TanStack StartRC

Docs Examples GitHub Contributors

TanStack Router

Docs Examples GitHub Contributors

TanStack Query

Docs Examples GitHub Contributors

TanStack Table

Docs Examples Github Contributors

TanStack Formnew

Docs Examples Github Contributors

TanStack DBbeta

Docs Github Contributors

TanStack Virtual

Docs Examples Github Contributors

TanStack Paceralpha

Docs Examples Github Contributors

TanStack Storealpha

Docs Examples Github Contributors

TanStack Devtoolsalpha

Docs Github Contributors

More Libraries

Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide

Documentation

Framework

React logo

React

Version

Latest

Search...

+ K

Menu

Getting Started

Guides

API Reference

Examples

Framework

React logo

React

Version

Latest

Menu

Getting Started

Guides

API Reference

Examples

On this page

FormState

Copy Markdown

Interface: FormState<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer>
==============================================================================================================================================================

Defined in: packages/form-core/src/FormApi.ts:739

An object representing the current state of the form.

Extends
-------

  • BaseFormState <TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer>.DerivedFormState <TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer>

Type Parameters
---------------

• TFormData

• TOnMount extends undefined | FormValidateOrFn<TFormData>

• TOnChange extends undefined | FormValidateOrFn<TFormData>

• TOnChangeAsync extends undefined | FormAsyncValidateOrFn<TFormData>

• TOnBlur extends undefined | FormValidateOrFn<TFormData>

• TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>

• TOnSubmit extends undefined | FormValidateOrFn<TFormData>

• TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>

• TOnDynamic extends undefined | FormValidateOrFn<TFormData>

• TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>

• TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>

Properties
----------
### _force_re_eval?

ts

optional _force_re_eval: boolean;


optional _force_re_eval: boolean;

Defined in: packages/form-core/src/FormApi.ts:658

@private, used to force a re-evaluation of the form state when options change

#### Inherited from

ts

BaseFormState._force_re_eval


BaseFormState._force_re_eval

### canSubmit

ts

canSubmit: boolean;


canSubmit: boolean;

Defined in: packages/form-core/src/FormApi.ts:732

A boolean indicating if the form can be submitted based on its current state.

#### Inherited from

ts

DerivedFormState.canSubmit


DerivedFormState.canSubmit

### errorMap

ts

errorMap: ValidationErrorMap<UnwrapFormValidateOrFn<TOnMount>, UnwrapFormValidateOrFn<TOnChange>, UnwrapFormAsyncValidateOrFn<TOnChangeAsync>, UnwrapFormValidateOrFn<TOnBlur>, UnwrapFormAsyncValidateOrFn<TOnBlurAsync>, UnwrapFormValidateOrFn<TOnSubmit>, UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>, UnwrapFormValidateOrFn<TOnDynamic>, UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>, UnwrapFormAsyncValidateOrFn<TOnServer>>;


errorMap: ValidationErrorMap<UnwrapFormValidateOrFn<TOnMount>, UnwrapFormValidateOrFn<TOnChange>, UnwrapFormAsyncValidateOrFn<TOnChangeAsync>, UnwrapFormValidateOrFn<TOnBlur>, UnwrapFormAsyncValidateOrFn<TOnBlurAsync>, UnwrapFormValidateOrFn<TOnSubmit>, UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>, UnwrapFormValidateOrFn<TOnDynamic>, UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>, UnwrapFormAsyncValidateOrFn<TOnServer>>;

Defined in: packages/form-core/src/FormApi.ts:602

The error map for the form itself.

#### Inherited from

ts

BaseFormState.errorMap


BaseFormState.errorMap

### errors

ts

errors: (
  | UnwrapFormValidateOrFn<TOnMount>
  | UnwrapFormValidateOrFn<TOnChange>
  | UnwrapFormAsyncValidateOrFn<TOnChangeAsync>
  | UnwrapFormValidateOrFn<TOnBlur>
  | UnwrapFormAsyncValidateOrFn<TOnBlurAsync>
  | UnwrapFormValidateOrFn<TOnSubmit>
  | UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>
  | UnwrapFormValidateOrFn<TOnDynamic>
  | UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>
  | UnwrapFormAsyncValidateOrFn<TOnServer>)[];


errors: (
  | UnwrapFormValidateOrFn<TOnMount>
  | UnwrapFormValidateOrFn<TOnChange>
  | UnwrapFormAsyncValidateOrFn<TOnChangeAsync>
  | UnwrapFormValidateOrFn<TOnBlur>
  | UnwrapFormAsyncValidateOrFn<TOnBlurAsync>
  | UnwrapFormValidateOrFn<TOnSubmit>
  | UnwrapFormAsyncValidateOrFn<TOnSubmitAsync>
  | UnwrapFormValidateOrFn<TOnDynamic>
  | UnwrapFormAsyncValidateOrFn<TOnDynamicAsync>
  | UnwrapFormAsyncValidateOrFn<TOnServer>)[];

Defined in: packages/form-core/src/FormApi.ts:685

The error array for the form itself.

#### Inherited from

ts

DerivedFormState.errors


DerivedFormState.errors

### fieldMeta

ts

fieldMeta: Partial<Record<DeepKeys<TFormData>, AnyFieldMeta>>;


fieldMeta: Partial<Record<DeepKeys<TFormData>, AnyFieldMeta>>;

Defined in: packages/form-core/src/FormApi.ts:736

A record of field metadata for each field in the form.

#### Inherited from

ts

DerivedFormState.fieldMeta


DerivedFormState.fieldMeta

### fieldMetaBase

ts

fieldMetaBase: Partial<Record<DeepKeys<TFormData>, AnyFieldMetaBase>>;


fieldMetaBase: Partial<Record<DeepKeys<TFormData>, AnyFieldMetaBase>>;

Defined in: packages/form-core/src/FormApi.ts:621

A record of field metadata for each field in the form, not including the derived properties, like errors and such

#### Inherited from

ts

BaseFormState.fieldMetaBase


BaseFormState.fieldMetaBase

### isBlurred

ts

isBlurred: boolean;


isBlurred: boolean;

Defined in: packages/form-core/src/FormApi.ts:712

A boolean indicating if any of the form fields have been blurred.

#### Inherited from

ts

DerivedFormState.isBlurred


DerivedFormState.isBlurred

### isDefaultValue

ts

isDefaultValue: boolean;


isDefaultValue: boolean;

Defined in: packages/form-core/src/FormApi.ts:724

A boolean indicating if all of the form's fields are the same as default values.

#### Inherited from

ts

DerivedFormState.isDefaultValue


DerivedFormState.isDefaultValue

### isDirty

ts

isDirty: boolean;


isDirty: boolean;

Defined in: packages/form-core/src/FormApi.ts:716

A boolean indicating if any of the form's fields' values have been modified by the user. Evaluates true if the user have modified at least one of the fields. Opposite of isPristine.

#### Inherited from

ts

DerivedFormState.isDirty


DerivedFormState.isDirty

### isFieldsValid

ts

isFieldsValid: boolean;


isFieldsValid: boolean;

Defined in: packages/form-core/src/FormApi.ts:704

A boolean indicating if all the form fields are valid. Evaluates true if there are no field errors.

#### Inherited from

ts

DerivedFormState.isFieldsValid


DerivedFormState.isFieldsValid

### isFieldsValidating

ts

isFieldsValidating: boolean;


isFieldsValidating: boolean;

Defined in: packages/form-core/src/FormApi.ts:700

A boolean indicating if any of the form fields are currently validating.

#### Inherited from

ts

DerivedFormState.isFieldsValidating


DerivedFormState.isFieldsValidating

### isFormValid

ts

isFormValid: boolean;


isFormValid: boolean;

Defined in: packages/form-core/src/FormApi.ts:681

A boolean indicating if the form is valid.

#### Inherited from

ts

DerivedFormState.isFormValid


DerivedFormState.isFormValid

### isFormValidating

ts

isFormValidating: boolean;


isFormValidating: boolean;

Defined in: packages/form-core/src/FormApi.ts:677

A boolean indicating if the form is currently validating.

#### Inherited from

ts

DerivedFormState.isFormValidating


DerivedFormState.isFormValidating

### isPristine

ts

isPristine: boolean;


isPristine: boolean;

Defined in: packages/form-core/src/FormApi.ts:720

A boolean indicating if none of the form's fields' values have been modified by the user. Evaluates true if the user have not modified any of the fields. Opposite of isDirty.

#### Inherited from

ts

DerivedFormState.isPristine


DerivedFormState.isPristine

### isSubmitSuccessful

ts

isSubmitSuccessful: boolean;


isSubmitSuccessful: boolean;

Defined in: packages/form-core/src/FormApi.ts:654

A boolean indicating if the last submission was successful.

#### Inherited from

ts

BaseFormState.isSubmitSuccessful


BaseFormState.isSubmitSuccessful

### isSubmitted

ts

isSubmitted: boolean;


isSubmitted: boolean;

Defined in: packages/form-core/src/FormApi.ts:642

A boolean indicating if the onSubmit function has completed successfully.

Goes back to false at each new submission attempt.

Note: you can use isSubmitting to check if the form is currently submitting.

#### Inherited from

ts

BaseFormState.isSubmitted


BaseFormState.isSubmitted

### isSubmitting

ts

isSubmitting: boolean;


isSubmitting: boolean;

Defined in: packages/form-core/src/FormApi.ts:634

A boolean indicating if the form is currently in the process of being submitted after handleSubmit is called.

Goes back to false when submission completes for one of the following reasons:

  • the validation step returned errors.
  • the onSubmit function has completed.

Note: if you're running async operations in your onSubmit function make sure to await them to ensure isSubmitting is set to false only when the async operation completes.

This is useful for displaying loading indicators or disabling form inputs during submission.

#### Inherited from

ts

BaseFormState.isSubmitting


BaseFormState.isSubmitting

### isTouched

ts

isTouched: boolean;


isTouched: boolean;

Defined in: packages/form-core/src/FormApi.ts:708

A boolean indicating if any of the form fields have been touched.

#### Inherited from

ts

DerivedFormState.isTouched


DerivedFormState.isTouched

### isValid

ts

isValid: boolean;


isValid: boolean;

Defined in: packages/form-core/src/FormApi.ts:728

A boolean indicating if the form and all its fields are valid. Evaluates true if there are no errors.

#### Inherited from

ts

DerivedFormState.isValid


DerivedFormState.isValid

### isValidating

ts

isValidating: boolean;


isValidating: boolean;

Defined in: packages/form-core/src/FormApi.ts:646

A boolean indicating if the form or any of its fields are currently validating.

#### Inherited from

ts

BaseFormState.isValidating


BaseFormState.isValidating

### submissionAttempts

ts

submissionAttempts: number;


submissionAttempts: number;

Defined in: packages/form-core/src/FormApi.ts:650

A counter for tracking the number of submission attempts.

#### Inherited from

ts

BaseFormState.submissionAttempts


BaseFormState.submissionAttempts

### validationMetaMap

ts

validationMetaMap: Record<"onMount" | "onChange" | "onBlur" | "onSubmit" | "onDynamic" | "onServer", undefined | ValidationMeta>;


validationMetaMap: Record<"onMount" | "onChange" | "onBlur" | "onSubmit" | "onDynamic" | "onServer", undefined | ValidationMeta>;

Defined in: packages/form-core/src/FormApi.ts:617

An internal mechanism used for keeping track of validation logic in a form.

#### Inherited from

ts

BaseFormState.validationMetaMap


BaseFormState.validationMetaMap

### values

ts

values: TFormData;


values: TFormData;

Defined in: packages/form-core/src/FormApi.ts:598

The current values of the form fields.

#### Inherited from

ts

BaseFormState.values


BaseFormState.values

Edit on GitHub

Home

Partners Become a Partner

Code RabbitCode Rabbit CloudflareCloudflare AG GridAG Grid NetlifyNetlify NeonNeon WorkOSWorkOS ClerkClerk ConvexConvex ElectricElectric SentrySentry PrismaPrisma StrapiStrapi UnkeyUnkey

scarf analytics