Open History to see the last commit
1---
2id: FormGroupSubmitInvalidContext
3title: FormGroupSubmitInvalidContext
4---
5β
6Defined in: [FormGroupApi/FormGroupApi.public.ts:80](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L80)
7β
8Context passed to a form group's `onSubmitInvalid` when submission fails.
9β
10## Example
11β
12```ts
13{
14 // ...
15 onSubmitInvalid: ({ groupApi }) => {
16 document
17 .querySelector<HTMLElement>('[aria-invalid="true"]')
18 ?.focus()
19 },
20}
21```
22β
23## Type Parameters
24β
25### TFormData
26β
27`TFormData`
28β
29### TGroupName
30β
31`TGroupName`
32β
33### TGroupValue
34β
35`TGroupValue`
36β
37### TGroupErrorTypes
38β
39`TGroupErrorTypes` *extends* [`FormErrorTypes`](FormErrorTypes.md)
40β
41### TFormErrorTypes
42β
43`TFormErrorTypes` *extends* [`FormErrorTypes`](FormErrorTypes.md)
44β
45## Properties
46β
47### formApi
48β
49```ts
50formApi: FormApi<TFormData, TFormErrorTypes>;
51```
52β
53Defined in: [FormGroupApi/FormGroupApi.public.ts:90](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L90)
54β
55The parent form API handling the failed submission.
56β
57***
58β
59### groupApi
60β
61```ts
62groupApi: FormGroupApi<TFormData, TGroupName, TGroupValue, TGroupErrorTypes, TFormErrorTypes>;
63```
64β
65Defined in: [FormGroupApi/FormGroupApi.public.ts:92](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L92)
66β
67The group API handling the failed submission.
68β
69***
70β
71### value
72β
73```ts
74value: TGroupValue;
75```
76β
77Defined in: [FormGroupApi/FormGroupApi.public.ts:88](https://github.com/TanStack/form/blob/main/packages/form-core/src/FormGroupApi/FormGroupApi.public.ts#L88)
78β
79The group values for the failed submission.