how to add required validation to file upload input without using register()? #10018
Unanswered
yelnyafacee
asked this question in
General
Replies: 1 comment
-
You need to exclude |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to add the
required
validation input to afile upload
input field,but if I use
react-hook-form
register
theonFileChangeCapture()
code and theref (inputFileRef)
breaks and got overwritten byregister
anyone know how to fix this? Thanks
codesandbox link: https://codesandbox.io/p/sandbox/hungry-gianmarco-vdht3c?file=%2Fpages%2Findex.js&selection=%5B%7B%22endColumn%22%3A24%2C%22endLineNumber%22%3A58%2C%22startColumn%22%3A24%2C%22startLineNumber%22%3A58%7D%5D
Beta Was this translation helpful? Give feedback.
All reactions