Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

FormGroupApi.md

127 lines2.8 KB

1---
2id: FormGroupApi
3title: FormGroupApi
4---
5​
6Defined in: [FormGroupApi/FormGroupApi.public.ts:195](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L195)
7​
8## Type Parameters
9​
10### TFormData
11​
12`TFormData`
13​
14### TGroupName
15​
16`TGroupName`
17​
18### TGroupValue
19​
20`TGroupValue`
21​
22### TGroupErrorTypes
23​
24`TGroupErrorTypes` *extends* [`FormErrorTypes`](FormErrorTypes.md)
25​
26### TFormErrorTypes
27​
28`TFormErrorTypes` *extends* [`FormErrorTypes`](FormErrorTypes.md)
29​
30## Properties
31​
32### atom
33​
34```ts
35atom: ReadonlyAtom<FormGroupState<TGroupValue, TGroupErrorTypes>>;
36```
37​
38Defined in: [FormGroupApi/FormGroupApi.public.ts:205](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L205)
39​
40***
41​
42### form
43​
44```ts
45readonly form: FormApi<TFormData, TFormErrorTypes>;
46```
47​
48Defined in: [FormGroupApi/FormGroupApi.public.ts:202](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L202)
49​
50***
51​
52### handleSubmit
53​
54```ts
55handleSubmit: () => Promise<FormGroupValidateResult<TGroupValue>[]>;
56```
57​
58Defined in: [FormGroupApi/FormGroupApi.public.ts:211](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L211)
59​
60#### Returns
61​
62`Promise`\<[`FormGroupValidateResult`](../type-aliases/FormGroupValidateResult.md)\<`TGroupValue`\>[]\>
63​
64***
65​
66### name
67​
68```ts
69readonly name: TGroupName;
70```
71​
72Defined in: [FormGroupApi/FormGroupApi.public.ts:203](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L203)
73​
74***
75​
76### reset
77​
78```ts
79reset: () => void;
80```
81​
82Defined in: [FormGroupApi/FormGroupApi.public.ts:212](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L212)
83​
84#### Returns
85​
86`void`
87​
88***
89​
90### state
91​
92```ts
93readonly state: FormGroupState<TGroupValue, TGroupErrorTypes>;
94```
95​
96Defined in: [FormGroupApi/FormGroupApi.public.ts:206](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L206)
97​
98***
99​
100### validate
101​
102```ts
103validate: (signal) => Promise<FormGroupValidateResult<TGroupValue>[]>;
104```
105​
106Defined in: [FormGroupApi/FormGroupApi.public.ts:208](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L208)
107​
108#### Parameters
109​
110##### signal
111​
112 \| `"submit"`
113 \| [`ConfigurableValidationTrigger`](../type-aliases/ConfigurableValidationTrigger.md)
114​
115#### Returns
116​
117`Promise`\<[`FormGroupValidateResult`](../type-aliases/FormGroupValidateResult.md)\<`TGroupValue`\>[]\>
118​
119***
120​
121### value
122​
123```ts
124readonly value: TGroupValue;
125```
126​
127Defined in: [FormGroupApi/FormGroupApi.public.ts:207](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L207)