You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/Validation.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,10 @@ A validator is a function that takes form values, and returns errors for these v
4
4
5
5
You can use a validator by passing it to the [`useForm`](/docs/useForm) hook.
6
6
7
-
Its it recommended to use a validation library, as this makes the process of validating data mush easier. This library has [built-in support for yup](/docs/yup).
7
+
Its it recommended to use a validation library, as this makes the process of validating data mush easier. This library has drop-in functionallity for:
8
+
9
+
-[typed-object-validator](/docs/typed-object-validator): recommended, a typed-checked validation library
10
+
-[yup](/docs/yup): a widely used validation library
Copy file name to clipboardExpand all lines: articles/yup.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,30 @@
1
1
# yup
2
2
3
-
**typed-react-form** has built-in support for[yup](https://github.com/jquense/yup). This is a validation library which makes it mush easier to validate data.
3
+
To validate your form using[yup](https://www.npmjs.com/package/yup), do the following:
4
4
5
-
Use the `yupValidator(yupSchema, options?)` helper function to create a validator function for your yup schema.
Then use the `yupValidator(yupSchema, options?)` helper function to create a validator function for your yup schema, which you can then pass to the `useForm` hook.
6
12
7
13
## Parameters
8
14
9
15
#### `yupSchema`**(required)**
10
16
11
17
The yup validation schema that will validate the form values.
0 commit comments