Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6291 closed (fixed)

CASocialInsuranceNumberField documentation error

Reported by: jeff+django@… Owned by: nobody
Component: contrib.localflavor Version: master
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


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)

6291.diff (1.4 KB) - added by arien 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by arien

Attachment: 6291.diff added

comment:1 Changed 11 years ago by arien

Has patch: set
Triage Stage: UnreviewedReady for checkin

( 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.

comment:2 Changed 11 years ago by James Bennett

Triage Stage: Ready for checkinUnreviewed

comment:3 Changed 11 years ago by James Bennett

(don't mark your own tickets "ready for checkin"; that's the job of a triager or committer)

comment:4 Changed 11 years ago by arien

Triage Stage: UnreviewedAccepted

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 Changed 11 years ago by Chris Beaven

Triage Stage: AcceptedReady for checkin

comment:6 Changed 11 years ago by Adrian Holovaty

Note that the patch is technically not ready for checkin, because it breaks the tests in tests/regressiontests/forms/localflavor/ 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 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [6985]) Fixed #6291 -- Fixed error in CASocialInsuranceNumberField documentation and error message. Thanks, jeff+django@… and arien

comment:8 Changed 11 years ago by Chris Beaven

Apologies Adrian, I really should have checked that. I promise to be a bit less promote-happy :)

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