FieldOptions

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

An object type representing the options for a field in a form.

Extended by

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.

Defined in

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


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.

Defined in

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


defaultMeta?

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

An optional object with default metadata for the field.

Defined in

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


defaultValue?

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

An optional default value for the field.

Defined in

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


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.

Defined in

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


validatorAdapter?

ts
optional validatorAdapter: TFieldValidator;
optional validatorAdapter: TFieldValidator;

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

Defined in

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


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

Defined in

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

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.