Category "react-hook-form"

How to use react-dropzone with react-hook-form?

How to use react-dropzone with react-hook-form so that the form returns proper file - not just file name?

How to set focus a ref using React-Hook-Form

How do you implement set focus in an input using React-Hook-Form, this is what their FAQ's "How to share ref usage" code here https://www.react-hook-form.com/fa

How to create a reusable react-hook-form component with TypeScript generics?

Person component is reused in two different forms: Person.tsx import { UseFormReturn } from "react-hook-form"; import { FieldPaths } from "./types"; type Prop

Proper way to use react-hook-form Controller with Material-UI Autocomplete

I am trying to use a custom Material-UI Autocomplete component and connect it to react-hook-form. TLDR: Need to use MUI Autocomplete with react-hook-form Co

React-Hook-Form - defaultValues not updated are not registered

I have a form who get updated directly when an user change an input. For that, I use the onBlur method. When I change an input from the defaultValue, it save it

Yup when condition inside nested object

so i have a problem with conditional validation using yup. Basically i want shipping to have required properties when the checkbox is not toggled. I am using yu

Type 'Dispatch<SetStateAction<any[]>>' is not assignable to type '(values?: string) => void'

I'm very new to typescipt and trying to make a basic pin-input page. Sandbox link for my code . Although it is working, I'm getting this error for onChange func

Register is not a function when passing as a prop?

I use react-hook-form for the first time. I was reading the docs and followed along. Likewise, I already laid out my components and styled them. Now I am trying

Custom onChange for React Hook Form and watch()

I am trying to write a custom onChange and watch the change. Error: The watched myValue does not register the changes in the dropdown. Any ideas why? According

Where do I get user and pass for email form api setup?

I am trying to get this form working in Nextjs using 'React Hook Form'. So far I think everything is okay, but I need to know where to get the 'user' and 'pass'

Use react-hook-form with select and multiselect

I'm trying to use react-hook-form with multi-select and select but it is not working. It worked with normal text field but not with select and multiselect. Here

How to use yup validation on dynamic form using react-hook-form with useFieldArray

I'm trying to create a dynamic form using react-hook-form's useFieldArray hook. The user should be able to add or remove fields, thus making it dynamic. I've lo

React-hook-form doesn't set isDirty to false when back to initial state

In the official exemple for controlled inputs , if you modify the value of an input and then change it back to its initial value, isDirty will be set to true bu

React-select & React-hook-form Controller issue

I'm trying to implement register from react-hook-forms for react-select but in order to do that I need to make use of Controller from react-hook-forms but when

Submitting form from parent component

I would like to create a form where the submit button is located in the header. I'm currently using react-hook-forms but am having difficulties being able to su

How to make autocomplete field of material UI required?

I have tried a couple of ways in order to make the material UI's autocomplete field of type required but I am not getting the behavior that I wanted. I had enca

How to validate password and confirm password in react hook form? Is there any validate property and message in react hook form to show errors?

Actually, I try to validate the form and Stucked to validate the password and confirm the password.. is there any property in useForm to validate the password a

React Form hook - getting "required field" error message despite input being entered

I just started building a form using react form hook. Just started with single input called name and when I submit the form I get the error message. I tried to

A component is changing an uncontrolled Autocomplete to be controlled

Can you tell me that why I'm getting error "A component is changing an uncontrolled Autocomplete to be controlled. Elements should not switch from uncontrolled

First Character is not displaying in input field useForms

When I click on Submit, it gives an error "required". But when i type text it doesn't take first character. On entering first character it only removes "require