Posts
Members
Info
Syntax error on jest with @hookform/resolvers
Node versions tried: 12.20.0 and 14.15.4. I have @testing-library/jest-dom on my jest setup file. For context, I can write tests fine with @testing-library/react for any forms given that I don't use the package @hookform/resolvers. I can implement form validation manually…
0
11
Default values only applied to 1 field?
Could anyone help me figure out what I'm doing wrong with my form? Code Sandbox: https://codesandbox.io/embed/react-hook-form-input-components-test-xoofd For some reason, only 1 of the 3 default values is being filled by the form. When the form initializes, the getValues() does…
0
0
Deleted·7d# Help
Material UI checkbox not getting selected as compared to normal checkbox
On changing a text field I am manually setting checkboxes to true. Normal checkbox getting checked but Material ui checkbox not getting checked. However after submitting the form true value is reflecting for both the checkboxes. Demo…
0
0
Confusion around watch and default values
Im just joining a team who the old guy is not around anymore, he set up all of our stuff with react-hook-forms. Looking at the code, What I need to do is through the parent or between the two items, is dynamically set the value of a text box, when a dropdown value is selected.…
0
0
how can you trigger validation on the entire field array or just one item insid
if you have a field array with name of "test" that is an array of objects, how can you trigger validation on the entire field array or even just one item in the array? I thought trigger("test") would validate all of them but it doesnt. Also trigger("test[0])". I'd prefer this so…
0
2
How to add validation in react-google-recaptcha?
Hi , here i am having a form where the user enter the values and hit the sumbit button. its a normal form but it values are required so i added react-hook-form { required: true } option in it. Its working fine. Now i have added react-google-recaptcha init. But i dont know how to…
0
3
useFieldArray doesn't update fields
I've created a sandbox based on David Krause's (thanks David!) to illustrate my problem, but basically I'm struggling with how to watch an array of values. https://codesandbox.io/s/react-hook-form-usefieldarray-modular-7g552?fontsize=14&hidenavigation=1&theme=dark The example…
0
88
useFieldArray and material-table not working properly
Hi Team, I'm currently trying to use material-table (https://material-table.com/#/) in conjunction with react-hook-form. While it works smoothly most of the time, I sometimes experience very weird behaviour. I'm not completely sure whether this is the right place to post the…
0
6