-
Beta Was this translation helpful? Give feedback.
Answered by
Moshyfawn
Nov 22, 2023
Replies: 1 comment 6 replies
-
I don't see why the validation should fail in the screenshot you provided. The only odd thing I notice is |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I overlooked another aspect of how your file input is connected to RHF. You are spreading the return values of the
register
method and subsequently replacing theonChange
input callback with your customhandleFileInputChange
. This might be the reason for th behavior you're seeing. To prevent overriding theonChange
callback from the returnedregister
values, use theonChange
callback prop in the secondoptions
argument of theregister
method.