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

Using default country on form errors #489

Closed
robertpro opened this issue Feb 2, 2022 · 1 comment · Fixed by #493
Closed

Using default country on form errors #489

robertpro opened this issue Feb 2, 2022 · 1 comment · Fixed by #493

Comments

@robertpro
Copy link

robertpro commented Feb 2, 2022

Hello, first of all thanks for this application, I found an issue when adding a wrong number, I selected United States +1 and after the form is submitted and the page is re-loaded, I see the selection is American Samoa +1, inspecting the code shows the code +1 is not unique which makes the HTML show the first element with +1 value, is there any way to fix that issue?

image

This is the setting I am using:

PHONENUMBER_DEFAULT_REGION = "US"

Edit: I am using the PhoneNumberPrefixWidget widget.

@amateja
Copy link
Collaborator

amateja commented Feb 22, 2022

It looks like duplicate of #133.

francoisfreitag pushed a commit to amateja/django-phonenumber-field that referenced this issue Jun 14, 2022
Each choice should be indexed with a unique value, use the region ISO code
over the national prefix.

Fixes stefanfoulis#133
Fixes stefanfoulis#251
Fixes stefanfoulis#489
francoisfreitag pushed a commit that referenced this issue Jun 14, 2022
Each choice should be indexed with a unique value, use the region ISO code
over the national prefix.

Fixes #133
Fixes #251
Fixes #489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants