Open History to see the last commit
1---
2id: FieldGroupHelper
3title: FieldGroupHelper
4---
5β
6Defined in: [FieldGroup/fieldGroupTypes.public.ts:259](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroup/fieldGroupTypes.public.ts#L259)
7β
8Declares the virtual fields in a reusable field group and how their value
9types may bind to concrete form fields.
10β
11## Example
12β
13```ts
14const profileFields = defineFieldGroup(({ strict, loose }) => ({
15 name: strict(''),
16 status: loose<string>(),
17}))
18```
19β
20## Properties
21β
22### loose
23β
24```ts
25loose: {
26<TValue> (value): LooseFieldGroupFieldSlot<TValue>;
27<TValue> (): LooseFieldGroupFieldSlot<TValue>;
28};
29```
30β
31Defined in: [FieldGroup/fieldGroupTypes.public.ts:298](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroup/fieldGroupTypes.public.ts#L298)
32β
33Declares a virtual field that can bind to form fields whose value type is
34assignable to the declared type.
35β
36#### Call Signature
37β
38```ts
39<TValue>(value): LooseFieldGroupFieldSlot<TValue>;
40```
41β
42##### Type Parameters
43β
44###### TValue
45β
46`TValue`
47β
48Inferred from the representative value.
49β
50##### Parameters
51β
52###### value
53β
54`TValue`
55β
56A representative value used only for type inference.
57β
58##### Returns
59β
60[`LooseFieldGroupFieldSlot`](../type-aliases/LooseFieldGroupFieldSlot.md)\<`TValue`\>
61β
62A field slot that uses assignable value-type matching.
63β
64#### Call Signature
65β
66```ts
67<TValue>(): LooseFieldGroupFieldSlot<TValue>;
68```
69β
70##### Type Parameters
71β
72###### TValue
73β
74`TValue`
75β
76The value type that compatible concrete field values
77must be assignable to.
78β
79##### Returns
80β
81[`LooseFieldGroupFieldSlot`](../type-aliases/LooseFieldGroupFieldSlot.md)\<`TValue`\>
82β
83A field slot that uses assignable value-type matching.
84β
85#### Example
86β
87```tsx
88const passwordFieldGroup = defineFieldGroup(({ loose }) => ({
89 password: loose<string>(),
90 confirmPassword: loose<string>(),
91}))
92```
93β
94***
95β
96### strict
97β
98```ts
99strict: {
100<TValue> (value): StrictFieldGroupFieldSlot<TValue>;
101<TValue> (): StrictFieldGroupFieldSlot<TValue>;
102};
103```
104β
105Defined in: [FieldGroup/fieldGroupTypes.public.ts:272](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroup/fieldGroupTypes.public.ts#L272)
106β
107Declares a virtual field whose value type must exactly match the value type
108of the concrete form field it binds to.
109β
110#### Call Signature
111β
112```ts
113<TValue>(value): StrictFieldGroupFieldSlot<TValue>;
114```
115β
116##### Type Parameters
117β
118###### TValue
119β
120`TValue`
121β
122Inferred from the representative value.
123β
124##### Parameters
125β
126###### value
127β
128`TValue`
129β
130A representative value used only for type inference.
131β
132##### Returns
133β
134[`StrictFieldGroupFieldSlot`](../type-aliases/StrictFieldGroupFieldSlot.md)\<`TValue`\>
135β
136A field slot that uses strict value-type matching.
137β
138#### Call Signature
139β
140```ts
141<TValue>(): StrictFieldGroupFieldSlot<TValue>;
142```
143β
144##### Type Parameters
145β
146###### TValue
147β
148`TValue`
149β
150The value type the concrete form field must match
151exactly.
152β
153##### Returns
154β
155[`StrictFieldGroupFieldSlot`](../type-aliases/StrictFieldGroupFieldSlot.md)\<`TValue`\>
156β
157A field slot that uses strict value-type matching.
158β
159#### Example
160β
161```tsx
162const passwordFieldGroup = defineFieldGroup(({ strict }) => ({
163 password: strict<string>(),
164 confirmPassword: strict<string>(),
165}))
166```