issue: handleSubmit does not throw error when validation is invalid #11614
Replies: 6 comments
-
Sandbox not found. |
Beta Was this translation helpful? Give feedback.
-
@Moshyfawn I'm sorry. I changed directory. Could you see this?: |
Beta Was this translation helpful? Give feedback.
-
No, still "not found" 😅 |
Beta Was this translation helpful? Give feedback.
-
I changed permission. I'm sorry for inconvenience. |
Beta Was this translation helpful? Give feedback.
-
You are calling You can refer to the rules section for a |
Beta Was this translation helpful? Give feedback.
-
Thank you for your comment and I'm sorry for late reply. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.51.0
Codesandbox/Expo snack
https://codesandbox.io/p/sandbox/handlesubmit-does-not-throw-error-when-validation-is-invalid-h5tfmj?file=%2Fsrc%2FApp.tsx
Steps to reproduce
Expected behaviour
expect: isSuccesSubmit set to false if validation has error
actual: isSuccessSubmit set to true regardless validation result
I think it should be checked there has validation errors in below logic:
react-hook-form/src/logic/createFormControl.ts
Line 1162 in 97c3ba4
I expected that result but it might be misunderstanding.
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions