Open Rekk1d opened 5 months ago
Hi. I don't use react-hook-form
so I dunno. I won't be looking into this issue (if there is any). Perhaps it's an issue in how you're using the library because no one has reported anything like that.
@Rekk1d Maybe this could be of use to you.
Wrapped with react-phone-number-input; you can try Shadcn Phone Input.
Hi! I have a form for changing the user's phone number in my personal account. Logically, the default Value (the user's current phone number) should be displayed in the phone number field. But if you do this, the react hook form will return an error stating that the field is empty (although everything is fine with the default Value, it exists). If you replace
value={value}
in the code, then value is undefined for some reason, and accordingly react hook form returns an error.Here is a sample code and a demo.
Example 1:
PhoneInput component:
Form:
Form: