FieldApiOptions

Interface: FieldApiOptions<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TParentSubmitMeta>

Defined in: packages/form-core/src/FieldApi.ts:446

An object type representing the required options for the FieldApi class.

Extends

  • FieldOptions<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync>

Type Parameters

TParentData

TName extends DeepKeys<TParentData>

TData extends DeepValue<TParentData, TName>

TOnMount extends undefined | FieldValidateOrFn<TParentData, TName, TData>

TOnChange extends undefined | FieldValidateOrFn<TParentData, TName, TData>

TOnChangeAsync extends undefined | FieldAsyncValidateOrFn<TParentData, TName, TData>

TOnBlur extends undefined | FieldValidateOrFn<TParentData, TName, TData>

TOnBlurAsync extends undefined | FieldAsyncValidateOrFn<TParentData, TName, TData>

TOnSubmit extends undefined | FieldValidateOrFn<TParentData, TName, TData>

TOnSubmitAsync extends undefined | FieldAsyncValidateOrFn<TParentData, TName, TData>

TFormOnMount extends undefined | FormValidateOrFn<TParentData>

TFormOnChange extends undefined | FormValidateOrFn<TParentData>

TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>

TFormOnBlur extends undefined | FormValidateOrFn<TParentData>

TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>

TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>

TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>

TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>

TParentSubmitMeta

Properties

asyncAlways?

ts
optional asyncAlways: boolean;
optional asyncAlways: boolean;

Defined in: packages/form-core/src/FieldApi.ts:393

If true, always run async validation, even if there are errors emitted during synchronous validation.

Inherited from

FieldOptions.asyncAlways


asyncDebounceMs?

ts
optional asyncDebounceMs: number;
optional asyncDebounceMs: number;

Defined in: packages/form-core/src/FieldApi.ts:389

The default time to debounce async validation if there is not a more specific debounce time passed.

Inherited from

FieldOptions.asyncDebounceMs


defaultMeta?

ts
optional defaultMeta: Partial<FieldMeta<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, any, any, any, any, any, any, any>>;
optional defaultMeta: Partial<FieldMeta<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, any, any, any, any, any, any, any>>;

Defined in: packages/form-core/src/FieldApi.ts:412

An optional object with default metadata for the field.

Inherited from

FieldOptions.defaultMeta


defaultValue?

ts
optional defaultValue: NoInfer<TData>;
optional defaultValue: NoInfer<TData>;

Defined in: packages/form-core/src/FieldApi.ts:385

An optional default value for the field.

Inherited from

FieldOptions.defaultValue


disableErrorFlat?

ts
optional disableErrorFlat: boolean;
optional disableErrorFlat: boolean;

Defined in: packages/form-core/src/FieldApi.ts:440

Disable 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.

Inherited from

FieldOptions.disableErrorFlat


form

ts
form: FormApi<TParentData, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TParentSubmitMeta>;
form: FormApi<TParentData, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TParentSubmitMeta>;

Defined in: packages/form-core/src/FieldApi.ts:498


listeners?

ts
optional listeners: FieldListeners<TParentData, TName, TData>;
optional listeners: FieldListeners<TParentData, TName, TData>;

Defined in: packages/form-core/src/FieldApi.ts:436

A list of listeners which attach to the corresponding events

Inherited from

FieldOptions.listeners


name

ts
name: TName;
name: TName;

Defined in: packages/form-core/src/FieldApi.ts:381

The field name. The type will be DeepKeys<TParentData> to ensure your name is a deep key of the parent dataset.

Inherited from

FieldOptions.name


validators?

ts
optional validators: FieldValidators<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync>;
optional validators: FieldValidators<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync>;

Defined in: packages/form-core/src/FieldApi.ts:397

A list of validators to pass to the field

Inherited from

FieldOptions.validators