Open History to see the last commit
1---
2id: FieldOptions
3title: FieldOptions
4---
5β
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7β
8# Interface: FieldOptions\<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync\>
9β
10Defined in: [packages/form-core/src/FieldApi.ts:361](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L361)
11β
12An object type representing the options for a field in a form.
13β
14## Extended by
15β
16- [`FieldApiOptions`](fieldapioptions.md)
17β
18## Type Parameters
19β
20β’ **TParentData**
21β
22β’ **TName** *extends* [`DeepKeys`](../type-aliases/deepkeys.md)\<`TParentData`\>
23β
24β’ **TData** *extends* [`DeepValue`](../type-aliases/deepvalue.md)\<`TParentData`, `TName`\>
25β
26β’ **TOnMount** *extends* `undefined` \| `FieldValidateOrFn`\<`TParentData`, `TName`, `TData`\>
27β
28β’ **TOnChange** *extends* `undefined` \| `FieldValidateOrFn`\<`TParentData`, `TName`, `TData`\>
29β
30β’ **TOnChangeAsync** *extends* `undefined` \| `FieldAsyncValidateOrFn`\<`TParentData`, `TName`, `TData`\>
31β
32β’ **TOnBlur** *extends* `undefined` \| `FieldValidateOrFn`\<`TParentData`, `TName`, `TData`\>
33β
34β’ **TOnBlurAsync** *extends* `undefined` \| `FieldAsyncValidateOrFn`\<`TParentData`, `TName`, `TData`\>
35β
36β’ **TOnSubmit** *extends* `undefined` \| `FieldValidateOrFn`\<`TParentData`, `TName`, `TData`\>
37β
38β’ **TOnSubmitAsync** *extends* `undefined` \| `FieldAsyncValidateOrFn`\<`TParentData`, `TName`, `TData`\>
39β
40## Properties
41β
42### asyncAlways?
43β
44```ts
45optional asyncAlways: boolean;
46```
47β
48Defined in: [packages/form-core/src/FieldApi.ts:394](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L394)
49β
50If `true`, always run async validation, even if there are errors emitted during synchronous validation.
51β
52***
53β
54### asyncDebounceMs?
55β
56```ts
57optional asyncDebounceMs: number;
58```
59β
60Defined in: [packages/form-core/src/FieldApi.ts:390](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L390)
61β
62The default time to debounce async validation if there is not a more specific debounce time passed.
63β
64***
65β
66### defaultMeta?
67β
68```ts
69optional defaultMeta: Partial<FieldMeta<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, any, any, any, any, any, any, any>>;
70```
71β
72Defined in: [packages/form-core/src/FieldApi.ts:413](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L413)
73β
74An optional object with default metadata for the field.
75β
76***
77β
78### defaultValue?
79β
80```ts
81optional defaultValue: NoInfer<TData>;
82```
83β
84Defined in: [packages/form-core/src/FieldApi.ts:386](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L386)
85β
86An optional default value for the field.
87β
88***
89β
90### disableErrorFlat?
91β
92```ts
93optional disableErrorFlat: boolean;
94```
95β
96Defined in: [packages/form-core/src/FieldApi.ts:441](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L441)
97β
98Disable the `flat(1)` operation on `field.errors`. This is useful if you want to keep the error structure as is. Not suggested for most use-cases.
99β
100***
101β
102### listeners?
103β
104```ts
105optional listeners: FieldListeners<TParentData, TName, TData>;
106```
107β
108Defined in: [packages/form-core/src/FieldApi.ts:437](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L437)
109β
110A list of listeners which attach to the corresponding events
111β
112***
113β
114### name
115β
116```ts
117name: TName;
118```
119β
120Defined in: [packages/form-core/src/FieldApi.ts:382](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L382)
121β
122The field name. The type will be `DeepKeys<TParentData>` to ensure your name is a deep key of the parent dataset.
123β
124***
125β
126### validators?
127β
128```ts
129optional validators: FieldValidators<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync>;
130```
131β
132Defined in: [packages/form-core/src/FieldApi.ts:398](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldApi.ts#L398)
133β
134A list of validators to pass to the field