Open History to see the last commit
1---
2id: Validator
3title: Validator
4---
5β
6Defined in: [validation.public.ts:41](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L41)
7β
8Configures validation for a form, form group, or field.
9β
10## Extends
11β
12- [`BaseValidator`](BaseValidator.md)\<`TValidator`\>
13β
14## Extended by
15β
16- [`FormGroupValidator`](FormGroupValidator.md)
17- [`FieldValidator`](FieldValidator.md)
18β
19## Type Parameters
20β
21### TFormData
22β
23`TFormData`
24β
25Library-managed. Do not specify explicitly.
26β
27### TValidator
28β
29`TValidator` *extends*
30 \| [`StandardSchemaV1`](../type-aliases/StandardSchemaV1.md)
31 \| [`ValidatorFn`](../type-aliases/ValidatorFn.md)\<`any`, `any`\>
32β
33Library-managed. Do not specify explicitly.
34β
35### TContextValue
36β
37`TContextValue`
38β
39Library-managed. Do not specify explicitly.
40β
41### TTrigger
42β
43`TTrigger` *extends* [`ValidatorTrigger`](../type-aliases/ValidatorTrigger.md) = [`ValidatorTrigger`](../type-aliases/ValidatorTrigger.md)
44β
45Library-managed. Do not specify explicitly.
46β
47### TScope
48β
49`TScope` *extends* [`ValidatorScope`](../type-aliases/ValidatorScope.md) = [`ValidatorScope`](../type-aliases/ValidatorScope.md)
50β
51Library-managed. Do not specify explicitly.
52β
53## Properties
54β
55### bailIfInvalid?
56β
57```ts
58optional bailIfInvalid?: boolean;
59```
60β
61Defined in: [validation.public.ts:29](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L29)
62β
63If `true`, skips this and subsequent validators when earlier validation has failed.
64β
65If `false`, earlier failures do not prevent this validator from running.
66β
67#### Default
68β
69```ts
70false
71```
72β
73#### Inherited from
74β
75[`BaseValidator`](BaseValidator.md).[`bailIfInvalid`](BaseValidator.md#bailifinvalid)
76β
77***
78β
79### run
80β
81```ts
82run: TValidator;
83```
84β
85Defined in: [validation.public.ts:21](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L21)
86β
87The function or Standard Schema that validates the value in this validator's scope.
88β
89#### Inherited from
90β
91[`BaseValidator`](BaseValidator.md).[`run`](BaseValidator.md#run)
92β
93***
94β
95### runOnMount?
96β
97```ts
98optional runOnMount?: boolean;
99```
100β
101Defined in: [validation.public.ts:64](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L64)
102β
103Whether this validator runs when the form is constructed or when its field
104or form group first mounts.
105β
106#### Default
107β
108```ts
109false
110```
111β
112***
113β
114### skipOnSubmit?
115β
116```ts
117optional skipOnSubmit?:
118 | boolean
119| ValidationPredicateFn<TFormData, TContextValue, TScope>;
120```
121β
122Defined in: [validation.public.ts:56](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L56)
123β
124Whether this validator runs during a submission attempt, independently of `triggers`.
125β
126Pass a boolean directly, or pass a function that returns
127`true` to skip it for the current attempt.
128β
129#### Default
130β
131```ts
132false
133```
134β
135***
136β
137### triggerDebounceMs?
138β
139```ts
140optional triggerDebounceMs?:
141 | number
142| ValidationDebounceFn<TFormData, TContextValue, TScope>;
143```
144β
145Defined in: [validation.public.ts:74](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L74)
146β
147The delay in milliseconds before validation runs for change or blur events.
148β
149Pass a number for a fixed delay, or pass a function that returns the delay
150for the current event. Repeated events restart the delay.
151Submission validation runs immediately.
152β
153#### Default
154β
155```ts
1560
157```
158β
159***
160β
161### triggers
162β
163```ts
164triggers: ValidationTriggerOption<TFormData, TContextValue, TTrigger, TScope>[];
165```
166β
167Defined in: [validation.public.ts:82](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L82)
168β
169Change and blur events that can run this validator, optionally with conditions.
170β
171An empty array disables change and blur validation. Configure submission
172separately with `skipOnSubmit` and initial validation with `runOnMount`.