Interface: FieldApiOptions<TParentData, TName, TFieldValidator, TFormValidator, TData>

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

Extends

  • FieldOptions<TParentData, TName, TFieldValidator, TFormValidator, TData>

Type parameters

TParentData

TName extends DeepKeys<TParentData>

TFieldValidator extends Validator<DeepValue<TParentData, TName>, unknown> | undefined = undefined

TFormValidator extends Validator<TParentData, unknown> | undefined = undefined

TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>

Properties

asyncAlways?

ts
optional asyncAlways: boolean;
optional asyncAlways: boolean;

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

Inherited from

FieldOptions.asyncAlways

Source

packages/form-core/src/FieldApi.ts:283


asyncDebounceMs?

ts
optional asyncDebounceMs: number;
optional asyncDebounceMs: number;

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

Inherited from

FieldOptions.asyncDebounceMs

Source

packages/form-core/src/FieldApi.ts:279


defaultMeta?

ts
optional defaultMeta: Partial<FieldMeta>;
optional defaultMeta: Partial<FieldMeta>;

An optional object with default metadata for the field.

Inherited from

FieldOptions.defaultMeta

Source

packages/form-core/src/FieldApi.ts:302


defaultValue?

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

An optional default value for the field.

Inherited from

FieldOptions.defaultValue

Source

packages/form-core/src/FieldApi.ts:275


form

ts
form: FormApi<TParentData, TFormValidator>;
form: FormApi<TParentData, TFormValidator>;

Source

packages/form-core/src/FieldApi.ts:325


name

ts
name: TName;
name: TName;

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

Source

packages/form-core/src/FieldApi.ts:271


preserveValue?

ts
optional preserveValue: boolean;
optional preserveValue: boolean;

Inherited from

FieldOptions.preserveValue

Source

packages/form-core/src/FieldApi.ts:284


validatorAdapter?

ts
optional validatorAdapter: TFieldValidator;
optional validatorAdapter: TFieldValidator;

A validator provided by an extension, like yupValidator from @tanstack/yup-form-adapter

Inherited from

FieldOptions.validatorAdapter

Source

packages/form-core/src/FieldApi.ts:288


validators?

ts
optional validators: FieldValidators<TParentData, TName, TFieldValidator, TFormValidator, TData>;
optional validators: FieldValidators<TParentData, TName, TFieldValidator, TFormValidator, TData>;

A list of validators to pass to the field

Inherited from

FieldOptions.validators

Source

packages/form-core/src/FieldApi.ts:292

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.