Open History to see the last commit
1---
2id: FormState
3title: FormState
4---
5β
6# Type Alias: FormState\<TFormData\>
7β
8```ts
9type FormState<TFormData>: object;
10```
11β
12An object representing the current state of the form.
13β
14## Type Parameters
15β
16β’ **TFormData**
17β
18## Type declaration
19β
20### canSubmit
21β
22```ts
23canSubmit: boolean;
24```
25β
26A boolean indicating if the form can be submitted based on its current state.
27β
28### errorMap
29β
30```ts
31errorMap: ValidationErrorMap;
32```
33β
34The error map for the form itself.
35β
36### errors
37β
38```ts
39errors: ValidationError[];
40```
41β
42The error array for the form itself.
43β
44### fieldMeta
45β
46```ts
47fieldMeta: Record<DeepKeys<TFormData>, FieldMeta>;
48```
49β
50A record of field metadata for each field in the form.
51β
52### isDirty
53β
54```ts
55isDirty: boolean;
56```
57β
58A boolean indicating if any of the form's fields' values have been modified by the user. `True` if the user have modified at least one of the fields. Opposite of `isPristine`.
59β
60### isFieldsValid
61β
62```ts
63isFieldsValid: boolean;
64```
65β
66A boolean indicating if all the form fields are valid.
67β
68### isFieldsValidating
69β
70```ts
71isFieldsValidating: boolean;
72```
73β
74A boolean indicating if any of the form fields are currently validating.
75β
76### isFormValid
77β
78```ts
79isFormValid: boolean;
80```
81β
82A boolean indicating if the form is valid.
83β
84### isFormValidating
85β
86```ts
87isFormValidating: boolean;
88```
89β
90A boolean indicating if the form is currently validating.
91β
92### isPristine
93β
94```ts
95isPristine: boolean;
96```
97β
98A boolean indicating if none of the form's fields' values have been modified by the user. `True` if the user have not modified any of the fields. Opposite of `isDirty`.
99β
100### isSubmitted
101β
102```ts
103isSubmitted: boolean;
104```
105β
106A boolean indicating if the form has been submitted.
107β
108### isSubmitting
109β
110```ts
111isSubmitting: boolean;
112```
113β
114A boolean indicating if the form is currently submitting.
115β
116### isTouched
117β
118```ts
119isTouched: boolean;
120```
121β
122A boolean indicating if any of the form fields have been touched.
123β
124### isValid
125β
126```ts
127isValid: boolean;
128```
129β
130A boolean indicating if the form and all its fields are valid.
131β
132### isValidating
133β
134```ts
135isValidating: boolean;
136```
137β
138A boolean indicating if the form or any of its fields are currently validating.
139β
140### submissionAttempts
141β
142```ts
143submissionAttempts: number;
144```
145β
146A counter for tracking the number of submission attempts.
147β
148### validationMetaMap
149β
150```ts
151validationMetaMap: Record<ValidationErrorMapKeys, ValidationMeta | undefined>;
152```
153β
154An internal mechanism used for keeping track of validation logic in a form.
155β
156### values
157β
158```ts
159values: TFormData;
160```
161β
162The current values of the form fields.
163β
164## Defined in
165β
166[packages/form-core/src/FormApi.ts:198](https://github.com/TanStack/form/blob/a6313b7699753752ae30ff16c169e0b08c2369e8/packages/form-core/src/FormApi.ts#L198)