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

No country data #1876

Closed
minhluan259 opened this issue Nov 15, 2024 · 3 comments
Closed

No country data #1876

minhluan259 opened this issue Nov 15, 2024 · 3 comments

Comments

@minhluan259
Copy link

minhluan259 commented Nov 15, 2024

Plugin version

e.g. v24.7.0 (please try latest version)

Expected behaviour

Many countries/sub-countries are not support in the list, so we need an option to allow display Global Flag option in the list, so user can select Global option and add himself phone number without validating the number.

https://intl-tel-input.com/examples/country-sync.html
In this case, if the user selects a country that is not in the list, the phone number input will show the Global Flag and the user will be able to add the phone number without validating the number instead of getting an error. No country data for 'bv'

Actual behaviour

Users are not able add telephone number if they country is not on the list.

@jackocnr
Copy link
Owner

Can you give a specific example of the problem, for the user? What country are they from, and what number are they trying to enter, and what problem are they having?

@minhluan259
Copy link
Author

Here is a specific example:

Untitled.Project.mp4

@jackocnr
Copy link
Owner

jackocnr commented Dec 3, 2024

You're getting an error because you're calling setCountry and passing an unsupported country code. There is a specific list of criteria required for us to support a country, and Antarctica doesn't meet that criteria. If you want to have those countries in your separate Country list, then before calling setCountry, you'll need to check that it is a supported country code (e.g. using getCountryData), and if it's not supported, you can call setCountry() without passing an argument, to select the empty state (Globe icon).

@jackocnr jackocnr closed this as completed Dec 3, 2024
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