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

ErrorVisibilityContext.md

47 lines1.1 KB

1---
2id: ErrorVisibilityContext
3title: ErrorVisibilityContext
4---
5​
6Defined in: [validation.public.ts:315](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L315)
7​
8Form and field state used to decide whether to show a field's errors.
9​
10## Type Parameters
11​
12### TFormData
13​
14`TFormData`
15​
16Library-managed. Do not specify explicitly.
17​
18### TFormErrorTypes
19​
20`TFormErrorTypes` *extends* [`FormErrorTypes`](FormErrorTypes.md)
21​
22Library-managed. Do not specify explicitly.
23​
24## Properties
25​
26### fieldState
27​
28```ts
29fieldState: ErrorVisibilityFieldState;
30```
31​
32Defined in: [validation.public.ts:325](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L325)
33​
34The field whose errors the policy controls.
35​
36***
37​
38### state
39​
40```ts
41state: FormState<TFormData, TFormErrorTypes>;
42```
43​
44Defined in: [validation.public.ts:323](https://github.com/TanStack/form/blob/main/packages/form-core/src/validation.public.ts#L323)
45​
46Current form state. For a field in a form group, flags and submission
47counters describe that group. `values` and `errors` describe the whole form.