stefanfoulis / django-phonenumber-field

A django model and form field for normalised phone numbers using python-phonenumbers
MIT License
1.48k stars 318 forks source link

Handling of special (non-geo) phone numbers #605

Open francoisfreitag opened 5 months ago

francoisfreitag commented 5 months ago

https://github.com/stefanfoulis/django-phonenumber-field/pull/603#discussion_r1555083349

In the split phone number field, the list of regions come from phonenumbers.COUNTRY_CODE_TO_REGION_CODE. However, that dict contains a special region with code "001", corresponding to prefixes in phonenumbers.COUNTRY_CODES_FOR_NON_GEO_REGIONS. These prefixes ought to be handled separately (either not proposed or offered individually). Currently, only the last one (+979) shows up, with the label “world”.