Validation in react-hook-form #2864
-
UNNECESSARY VALIDATIONS.I used to use formik before and i am currently enjoying react-hook-form, but a problem that i am facing with both of these libraries is that when there is a change in any value , validation for the whole schema takes place. This is particularly an issue when you are trying to do some async live validation(with debounce) using test in yup as any change in any other input also trigger the validation, making an unnecessary api call. Does anyone know why these libraries do this for validation? Is there any way to bypass it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That's the nature of schema validation, if you want to avoid this customize your own |
Beta Was this translation helpful? Give feedback.
That's the nature of schema validation, if you want to avoid this customize your own
resolver
or using our build-in validation which doesn't have this perf issue as validation is at Field level.