Opened 17 years ago
Closed 12 years ago
#7463 closed New feature (invalid)
alternate phone regex for US flavor forms
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
Severity: | Normal | Keywords: | localflavor, forms, areacode, delimiter, localflavorsplit |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
A growing subset of US organizations are starting to allow a slash as an area code delimiter (xxx/xxx-xxxx
). Modulo tests by the core Django team, this patch enables that.
Attachments (3)
Change History (11)
by , 17 years ago
Attachment: | forms.py.patch added |
---|
comment:1 by , 16 years ago
milestone: | → post-1.0 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 14 years ago
Component: | Contrib apps → contrib.localflavor |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:5 by , 14 years ago
Easy pickings: | unset |
---|---|
Needs tests: | set |
comment:6 by , 13 years ago
Needs tests: | unset |
---|---|
UI/UX: | unset |
Updated the patch to apply to latest trunk and included new valid patterns to localflavor tests.
by , 13 years ago
Attachment: | 7463-failingtests.diff added |
---|
comment:7 by , 13 years ago
Patch needs improvement: | set |
---|
This format isn't exactly familiar to me, but I'm not exactly an arbiter of common US phone number formats so I accept that it might be nice to support nnn/nnn-nnnn. However, I don't think nnn/nnn/nnnn nor nnn-nnn/nnnn should be accepted -- those are not mentioned in the original description and don't look at all valid to me, yet it seems they are acceptable with the patch. See additional tests I added that try to ensure these patterns are not accepted -- these tests fail with the patch.
comment:8 by , 12 years ago
Keywords: | localflavorsplit added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
django.contrib.localflavor
is now deprecated — see https://docs.djangoproject.com/en/dev/ref/contrib/localflavor/
A repository was created for each localflavor at https://github.com/django/django-localflavor-? (Replace with the country code.)
If you're still interested in this ticket, could you create a pull request on that repository?
Sorry for not resolving this issue earlier, and thanks for your input!
patch: allow forward slash as areacode delimiter