Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

FormValidationPredicateContext.md

105 lines2.1 KB

Defined in: validation.public.ts:419

Current form state available to validator conditions and delay callbacks.

Extends

  • BaseValidationPredicateContext<TFormData, TFormData, "form">

Type Parameters

TFormData

TFormData

Library-managed. Do not specify explicitly.

Properties

fieldApi?

optional fieldApi?: AnyFieldApi;

Defined in: validation.public.ts:409

The field associated with the validation event, when available.

For form and group validators, this is the field that triggered the validation. For field validators, this is the field being validated.

Inherited from

BaseValidationPredicateContext.fieldApi

formApi

formApi: FormApi<TFormData, any>;

Defined in: validation.public.ts:402

The owning form, including its complete values and state.

Inherited from

BaseValidationPredicateContext.formApi

groupApi?

optional groupApi?: undefined;

Defined in: validation.public.ts:422


scope

scope: "form";

Defined in: validation.public.ts:400

Identifies whether value belongs to a form, form group, or field.

Inherited from

BaseValidationPredicateContext.scope

value

value: TFormData;

Defined in: validation.public.ts:411

The current value in this validator's scope when the callback is evaluated.

Inherited from

BaseValidationPredicateContext.value