File: formoptions.md | Updated: 11/15/2025
Search...
+ K
Auto
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples GitHub Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Docs Examples Github Contributors
Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide
Documentation
Framework
React
Version
v1
Search...
+ K
Menu
Getting Started
Guides
API Reference
Examples
Framework
React
Version
v1
Menu
Getting Started
Guides
API Reference
Examples
On this page
Copy Markdown
Defined in: packages/form-core/src/FormApi.ts:374
An object representing the options for a form.
Type Parameters
---------------
• TFormData
• TOnMount extends undefined | FormValidateOrFn<TFormData>
• TOnChange extends undefined | FormValidateOrFn<TFormData>
• TOnChangeAsync extends undefined | FormAsyncValidateOrFn<TFormData>
• TOnBlur extends undefined | FormValidateOrFn<TFormData>
• TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>
• TOnSubmit extends undefined | FormValidateOrFn<TFormData>
• TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>
• TOnDynamic extends undefined | FormValidateOrFn<TFormData>
• TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>
• TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>
• TSubmitMeta = never
Properties
----------
### asyncAlways?
ts
optional asyncAlways: boolean;
optional asyncAlways: boolean;
Defined in: packages/form-core/src/FormApi.ts:413
If true, always run async validation, even when sync validation has produced an error. Defaults to undefined.
ts
optional asyncDebounceMs: number;
optional asyncDebounceMs: number;
Defined in: packages/form-core/src/FormApi.ts:417
Optional time in milliseconds if you want to introduce a delay before firing off an async action.
ts
optional canSubmitWhenInvalid: boolean;
optional canSubmitWhenInvalid: boolean;
Defined in: packages/form-core/src/FormApi.ts:421
If true, allows the form to be submitted in an invalid state i.e. canSubmit will remain true regardless of validation errors. Defaults to undefined.
ts
optional defaultState: Partial<FormState<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer>>;
optional defaultState: Partial<FormState<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer>>;
Defined in: packages/form-core/src/FormApi.ts:395
The default state for the form.
ts
optional defaultValues: TFormData;
optional defaultValues: TFormData;
Defined in: packages/form-core/src/FormApi.ts:364
Set initial values for your form.
BaseFormOptions .defaultValues
ts
optional formId: string;
optional formId: string;
Defined in: packages/form-core/src/FormApi.ts:391
The form name, used for devtools and identification
ts
optional listeners: FormListeners<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>;
optional listeners: FormListeners<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>;
Defined in: packages/form-core/src/FormApi.ts:443
form level listeners
ts
optional onSubmit: (props) => any;
optional onSubmit: (props) => any;
Defined in: packages/form-core/src/FormApi.ts:461
A function to be called when the form is submitted, what should happen once the user submits a valid form returns any or a promise Promise<any>
#### Parameters ##### props ###### formApi
FormApi <TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>
TSubmitMeta
TFormData
any
ts
optional onSubmitInvalid: (props) => void;
optional onSubmitInvalid: (props) => void;
Defined in: packages/form-core/src/FormApi.ts:482
Specify an action for scenarios where the user tries to submit an invalid form.
#### Parameters ##### props ###### formApi
FormApi <TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>
TSubmitMeta
TFormData
void
ts
optional onSubmitMeta: TSubmitMeta;
optional onSubmitMeta: TSubmitMeta;
Defined in: packages/form-core/src/FormApi.ts:368
onSubmitMeta, the data passed from the handleSubmit handler, to the onSubmit function props
ts
optional transform: FormTransform<NoInfer<TFormData>, NoInfer<TOnMount>, NoInfer<TOnChange>, NoInfer<TOnChangeAsync>, NoInfer<TOnBlur>, NoInfer<TOnBlurAsync>, NoInfer<TOnSubmit>, NoInfer<TOnSubmitAsync>, NoInfer<TOnDynamic>, NoInfer<TOnDynamicAsync>, NoInfer<TOnServer>, NoInfer<TSubmitMeta>>;
optional transform: FormTransform<NoInfer<TFormData>, NoInfer<TOnMount>, NoInfer<TOnChange>, NoInfer<TOnChangeAsync>, NoInfer<TOnBlur>, NoInfer<TOnBlurAsync>, NoInfer<TOnSubmit>, NoInfer<TOnSubmitAsync>, NoInfer<TOnDynamic>, NoInfer<TOnDynamicAsync>, NoInfer<TOnServer>, NoInfer<TSubmitMeta>>;
Defined in: packages/form-core/src/FormApi.ts:500
ts
optional validationLogic: ValidationLogicFn;
optional validationLogic: ValidationLogicFn;
Defined in: packages/form-core/src/FormApi.ts:438
ts
optional validators: FormValidators<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync>;
optional validators: FormValidators<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync>;
Defined in: packages/form-core/src/FormApi.ts:425
A list of validators to pass to the form
