Bug Overview
I have dateOfBirth.month
, dateOfBirth.day
, and dateOfBirth.year
. The register
options say all items are required. After completing the form, all fields have a value and formState.touched
includes all items are touched, but isValid
is false
. If you look at the errors
of the form, you can see an error for dateOfBirth
.
To Reproduce...
disabled
state to !isValid
.Codesandbox
I have created a Codesandbox to reproduce the bug. The console.log
's will help you see the issue more clearly.
https://codesandbox.io/s/react-hook-form-isvalid-bug-r8dc5
Expected Behavior:
dateOfBirth
should not be listed in the errors
of the form. If the error is set to undefined
, isValid
should be true
.
Screenshots:
The ref:
The output after filling out the form:
Specifications
Please let me know if I can provide any further details. Thanks in advance! :)
fixed if you would like to verify
It looks like it's working! Thank you!
@chriscarrillo thanks a lot for reporting the issue and verify.