#6291 closed (fixed)
CASocialInsuranceNumberField documentation error
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.localflavor | Version: | dev |
Severity: | Keywords: | localflavor, ca | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Minor documentation error on CASocialInsuranceNumberField:
"A form field that validates input as a Canadian Social Insurance Number (SIN). A valid number must have the format XXX-XXX-XXXX and pass a Luhn mod-10 checksum."
Canadian SIN is a 9 digit number, not a 10 digit as suggested in the documentation.
Also noted that the default_error_messages text has the same mistake.
Attachments (1)
Change History (9)
by , 17 years ago
comment:1 by , 17 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 17 years ago
Triage Stage: | Ready for checkin → Unreviewed |
---|
comment:3 by , 17 years ago
(don't mark your own tickets "ready for checkin"; that's the job of a triager or committer)
comment:4 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
It's not "my" ticket. (I didn't report it.) I did submit the patch when triaging, though.
The reason I promoted straight to "ready for checkin" instead of leaving it as "accepted" (as I normally would have done) is that the issue is factual and easily verifiable (hence the link to a Canadian government site confirming the issue), and moreover the patch is trivial. I thought that would be okay in this case.
I'll move to "accepted" and leave it to somebody else to mark as "ready for checkin" if they feel that is the case.
comment:5 by , 17 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:6 by , 17 years ago
Note that the patch is technically not ready for checkin, because it breaks the tests in tests/regressiontests/forms/localflavor/ca.py
. I will fix this on my own, but in the future we should make sure the tests pass before marking something as "Ready for checkin."
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 by , 17 years ago
Apologies Adrian, I really should have checked that. I promise to be a bit less promote-happy :)
(http://www.hrsdc.gc.ca/en/gateways/nav/top_nav/program/sin.shtml confirms the SIN is 9 digits in length.)
The attached patch fixes the docs, a comment in the code and the default error message; the regex used to validate a SIN is correct as it is.