Opened 16 years ago

Closed 12 years ago

#7463 closed New feature (invalid)

alternate phone regex for US flavor forms

Reported by: kevin@… 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)

forms.py.patch (960 bytes ) - added by kevin@… 16 years ago.
patch: allow forward slash as areacode delimiter
7463.diff (1.5 KB ) - added by Mark Lavin 13 years ago.
Updated patch with tests.
7463-failingtests.diff (1.7 KB ) - added by Karen Tracey 13 years ago.

Download all attachments as: .zip

Change History (11)

by kevin@…, 16 years ago

Attachment: forms.py.patch added

patch: allow forward slash as areacode delimiter

comment:1 by Eric Holscher, 16 years ago

milestone: post-1.0
Triage Stage: UnreviewedAccepted

comment:2 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:3 by Gabriel Hurley, 14 years ago

Component: Contrib appscontrib.localflavor

comment:4 by Luke Plant, 14 years ago

Severity: Normal
Type: New feature

comment:5 by Julien Phalip, 14 years ago

Easy pickings: unset
Needs tests: set

by Mark Lavin, 13 years ago

Attachment: 7463.diff added

Updated patch with tests.

comment:6 by Mark Lavin, 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 Karen Tracey, 13 years ago

Attachment: 7463-failingtests.diff added

comment:7 by Karen Tracey, 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 Aymeric Augustin, 12 years ago

Keywords: localflavorsplit added
Resolution: invalid
Status: newclosed

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!

Note: See TracTickets for help on using tickets.
Back to Top