omeralpi / shadcn-phone-input

Customizable phone input component with proper validation for any country. Built on top of shadcn.
https://shadcn-phone-input.vercel.app
MIT License
422 stars 28 forks source link

Added a snippet in case of setting form field optional. #10

Closed omunite215 closed 5 months ago

omunite215 commented 5 months ago

Hey there!!

While developing a form needing a phone number using Next.JS(TypeScript), ShadCN UI and React-Hook-Form with Zod, I come across this really helpful repository.

I asked for ways to make this input optional and I tried testing your pull request but unfortunately it didn't worked. Anyways, I have fixed that problem by changing zod schema.

As I faced this issue, in future any developer may face it while using this code. In order to fix that I have just added a snippet in the readMe.md file in order to provide options to user to choose between REQUIRED and OPTIONAL fields.

I hope this improves the user experience of this code repository.

Appreciation for your good work. Om.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shadcn-phone-input ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2024 3:46pm