Telephone numbers: country and number in one input group, checked against that country's numbering plan, shown grouped its way #304
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#304
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the interface review of 2026-09-29:
06 12 34 56 78(the national form) and6 12 34 56 78(without the trunk zero) are both valid, and both are+33 6 12 34 56 78.What is there today
core/phone_field.pyis a country select and a text box side by side (partials/phone_widget.html), with the flag beside the select.core/phones.py::combinealready does the first half of the France example. A national number gets the country's code in front with its leading zeros removed, so06 12 34 56 78and6 12 34 56 78under France both become+33612345678. A number that starts with+or00ignores the select.phones.readablegroups the digits in threes whatever the country, for the same reason: a country's own grouping is part of the plan the module does not carry.Decisions to take
phonenumbers(Apache 2.0), and as aphonenumberslitebuild without the geocoding and carrier data. It is a dependency with regular releases, whichdependencies.ymlwould pick up every month.Done when
phone_numbers.htmlgives for the number having a line of its own still holds.+, a number with00, a number too short for its country, and a country with no trunk prefix.phones.py's docstring says what it does now and why the decision changed.Decided (2026-09-29): add the numbering plans (
phonenumberslite) and refuse what is impossible. A number that cannot exist for its country (the wrong length, a prefix the country does not use) is refused with the reason. A number the plan cannot place is kept, with a warning beside it. Numbers already stored are marked, never rewritten, and checked again the next time they are saved. Grouping follows each country's own rules, drawn from the stored E.164 form wherever a number is shown.