stefanfoulis / django-phonenumber-field

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

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

Open francoisfreitag opened 6 months ago

francoisfreitag commented 6 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”.