Opened 17 years ago
Closed 17 years ago
#5670 closed (fixed)
UKPostcodeField made more forgiving of input format
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
Severity: | Keywords: | uk postcode | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The UKPostcodeField in django.contrib.localflavor.uk does a good job of checking a UK postcode is valid. However, it requires the letters to be uppercase and a space between the two parts. I think that's a bit too strict.
Here is a version that is more forgiving. It uppercases the string and inserts the space in the correct place before validation.
Patch and tests attached.
Attachments (2)
Change History (5)
by , 17 years ago
Attachment: | ukpostcodefield.diff added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 17 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
This patch no longer applies cleanly. Can you update it to apply against trunk?
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch and tests