Open History to see the last commit
1---
2id: FieldOptions
3title: FieldOptions
4---
5β
6# Interface: FieldOptions\<TParentData, TName, TFieldValidator, TFormValidator, TData\>
7β
8An object type representing the options for a field in a form.
9β
10## Extended by
11β
12- [`FieldApiOptions`](fieldapioptions.md)
13β
14## Type Parameters
15β
16β’ **TParentData**
17β
18β’ **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\>
19β
20β’ **TFieldValidator** *extends* `Validator`\<[`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>, `unknown`\> \| `undefined` = `undefined`
21β
22β’ **TFormValidator** *extends* `Validator`\<`TParentData`, `unknown`\> \| `undefined` = `undefined`
23β
24β’ **TData** *extends* [`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\> = [`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>
25β
26## Properties
27β
28### asyncAlways?
29β
30```ts
31optional asyncAlways: boolean;
32```
33β
34If `true`, always run async validation, even if there are errors emitted during synchronous validation.
35β
36#### Defined in
37β
38[packages/form-core/src/FieldApi.ts:287](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L287)
39β
40***
41β
42### asyncDebounceMs?
43β
44```ts
45optional asyncDebounceMs: number;
46```
47β
48The default time to debounce async validation if there is not a more specific debounce time passed.
49β
50#### Defined in
51β
52[packages/form-core/src/FieldApi.ts:283](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L283)
53β
54***
55β
56### defaultMeta?
57β
58```ts
59optional defaultMeta: Partial<FieldMeta>;
60```
61β
62An optional object with default metadata for the field.
63β
64#### Defined in
65β
66[packages/form-core/src/FieldApi.ts:305](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L305)
67β
68***
69β
70### defaultValue?
71β
72```ts
73optional defaultValue: NoInfer<TData>;
74```
75β
76An optional default value for the field.
77β
78#### Defined in
79β
80[packages/form-core/src/FieldApi.ts:279](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L279)
81β
82***
83β
84### name
85β
86```ts
87name: TName;
88```
89β
90The field name. The type will be `DeepKeys<TParentData>` to ensure your name is a deep key of the parent dataset.
91β
92#### Defined in
93β
94[packages/form-core/src/FieldApi.ts:275](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L275)
95β
96***
97β
98### validatorAdapter?
99β
100```ts
101optional validatorAdapter: TFieldValidator;
102```
103β
104A validator provided by an extension, like `yupValidator` from `@tanstack/yup-form-adapter`
105β
106#### Defined in
107β
108[packages/form-core/src/FieldApi.ts:291](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L291)
109β
110***
111β
112### validators?
113β
114```ts
115optional validators: FieldValidators<TParentData, TName, TFieldValidator, TFormValidator, TData>;
116```
117β
118A list of validators to pass to the field
119β
120#### Defined in
121β
122[packages/form-core/src/FieldApi.ts:295](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L295)