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

FormGroupValidationPredicateContext.md

107 lines2.1 KB

1---
2id: FormGroupValidationPredicateContext
3title: FormGroupValidationPredicateContext
4---
5​
6Defined in: [validation.public.ts:430](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L430)
7​
8Current form group state available to validator conditions and delay callbacks.
9​
10## Extends
11​
12- `BaseValidationPredicateContext`\<`any`, `TGroupValue`, `"group"`\>
13​
14## Type Parameters
15​
16### TGroupValue
17​
18`TGroupValue`
19​
20Library-managed. Do not specify explicitly.
21​
22## Properties
23​
24### fieldApi?
25​
26```ts
27optional fieldApi?: AnyFieldApi;
28```
29​
30Defined in: [validation.public.ts:409](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L409)
31​
32The field associated with the validation event, when available.
33​
34For form and group validators, this is the field that triggered the
35validation. For field validators, this is the field being validated.
36​
37#### Inherited from
38​
39```ts
40BaseValidationPredicateContext.fieldApi
41```
42​
43***
44​
45### formApi
46​
47```ts
48formApi: FormApi<any, any>;
49```
50​
51Defined in: [validation.public.ts:402](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L402)
52​
53The owning form, including its complete values and state.
54​
55#### Inherited from
56​
57```ts
58BaseValidationPredicateContext.formApi
59```
60​
61***
62​
63### groupApi
64​
65```ts
66groupApi: FormGroupApi<any, any, TGroupValue, any, any>;
67```
68​
69Defined in: [validation.public.ts:434](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L434)
70​
71The form group whose value is being validated.
72​
73***
74​
75### scope
76​
77```ts
78scope: "group";
79```
80​
81Defined in: [validation.public.ts:400](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L400)
82​
83Identifies whether `value` belongs to a form, form group, or field.
84​
85#### Inherited from
86​
87```ts
88BaseValidationPredicateContext.scope
89```
90​
91***
92​
93### value
94​
95```ts
96value: TGroupValue;
97```
98​
99Defined in: [validation.public.ts:411](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L411)
100​
101The current value in this validator's scope when the callback is evaluated.
102​
103#### Inherited from
104​
105```ts
106BaseValidationPredicateContext.value
107```