Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown country: undefined for phone number +8345678345 #427

Open
rajkamal-kiwi opened this issue Aug 7, 2023 · 1 comment
Open

Unknown country: undefined for phone number +8345678345 #427

rajkamal-kiwi opened this issue Aug 7, 2023 · 1 comment

Comments

@rajkamal-kiwi
Copy link

Uncaught Error: Unknown country: undefined
at getCountryCallingCode (metadata.js:508:1)
at getInternationalPhoneNumberPrefix (getInternationalPhoneNumberPrefix.js:10:1)
at getPhoneInputWithCountryStateUpdateFromNewProps (getPhoneInputWithCountryStateUpdateFromNewProps.js:166:1)
at getDerivedStateFromProps (PhoneInputWithCountry.js:398:1)
at applyDerivedStateFromProps (react-dom.development.js:12594:1)
at updateClassInstance (react-dom.development.js:13198:1)
at updateClassComponent (react-dom.development.js:17098:1)
at beginWork (react-dom.development.js:18611:1)

The user cannot enter this phone number because there's validation on frontend but if database is updated with number then the component breaks.

@rajkamal-kiwi rajkamal-kiwi changed the title Unknown country code for phone number +8345678345 Unknown country: undefined for phone number +8345678345 Aug 7, 2023
@fender2
Copy link

fender2 commented Aug 18, 2023

Try adding defaultCountry: string? property and see if this fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants