Open History to see the last commit
1---
2id: FormValidator
3title: FormValidator
4---
5β
6Defined in: [validation.public.ts:816](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L816)
7β
8Configures validation of complete form values on the client or server.
9β
10## Extends
11β
12- [`BaseValidator`](BaseValidator.md)\<
13 \| [`FormValidatorFn`](../type-aliases/FormValidatorFn.md)\<`TFormData`\>
14 \| [`StandardSchemaV1`](../type-aliases/StandardSchemaV1.md)\<`TFormData`, `any`\>\>
15β
16## Type Parameters
17β
18### TFormData
19β
20`TFormData`
21β
22Library-managed. Do not specify explicitly.
23β
24## Properties
25β
26### bailIfInvalid?
27β
28```ts
29optional bailIfInvalid?: boolean;
30```
31β
32Defined in: [validation.public.ts:29](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L29)
33β
34If `true`, skips this and subsequent validators when earlier validation has failed.
35β
36If `false`, earlier failures do not prevent this validator from running.
37β
38#### Default
39β
40```ts
41false
42```
43β
44#### Inherited from
45β
46[`BaseValidator`](BaseValidator.md).[`bailIfInvalid`](BaseValidator.md#bailifinvalid)
47β
48***
49β
50### run
51β
52```ts
53run:
54 | FormValidatorFn<TFormData>
55| StandardSchemaV1<TFormData, any>;
56```
57β
58Defined in: [validation.public.ts:21](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L21)
59β
60The function or Standard Schema that validates the value in this validator's scope.
61β
62#### Inherited from
63β
64[`BaseValidator`](BaseValidator.md).[`run`](BaseValidator.md#run)
65β
66***
67β
68### runOnMount?
69β
70```ts
71optional runOnMount?: boolean;
72```
73β
74Defined in: [validation.public.ts:833](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L833)
75β
76Whether this validator runs when the form is constructed.
77β
78#### Default
79β
80```ts
81false
82```
83β
84***
85β
86### skipOnSubmit?
87β
88```ts
89optional skipOnSubmit?:
90 | boolean
91| ValidationPredicateFn<TFormData, TFormData, "form">;
92```
93β
94Defined in: [validation.public.ts:827](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L827)
95β
96Whether this validator runs during a client submission attempt, independently of `triggers`.
97β
98Pass a boolean or a function that returns
99`true` to skip it for the current attempt.
100β
101#### Default
102β
103```ts
104false
105```
106β
107***
108β
109### triggerDebounceMs?
110β
111```ts
112optional triggerDebounceMs?:
113 | number
114| ValidationDebounceFn<TFormData, TFormData, "form">;
115```
116β
117Defined in: [validation.public.ts:843](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L843)
118β
119The delay in milliseconds before validation runs for change or blur events.
120β
121Pass a number for a fixed delay, or pass a function that returns the delay
122for the current event. Repeated events restart the delay.
123Submission and server validation run immediately.
124β
125#### Default
126β
127```ts
1280
129```
130β
131***
132β
133### triggers
134β
135```ts
136triggers: FormValidationTriggerOption<TFormData, TFormData, "form">[];
137```
138β
139Defined in: [validation.public.ts:852](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L852)
140β
141Change and blur events that can run this validator, optionally with conditions.
142Add `'server'` to include it in `serverValidate`.
143β
144An empty array disables change, blur, and server validation. Configure client
145submission separately with `skipOnSubmit` and initial validation with `runOnMount`.