Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8229 closed (fixed)

Spanish ID card checksum validation fails on a specific case

Reported by: garcia_marc Owned by: garcia_marc
Component: contrib.localflavor Version: master
Severity: Keywords: es spanish
Cc: mgarcia@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The Spanish localflavor has a form field that validates a Spanish ID card number. The function calculates the algorithm based on a module 10 checksum. There is a specific case, when the result of the checksum is 0, that the function raises a "string index out of range" error. A simple transformation has to be applied on this case.

Attachments (1)

8229.diff (1.9 KB) - added by garcia_marc 8 years ago.
Fix for the issue, including a regression test for the failing case

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by garcia_marc

Fix for the issue, including a regression test for the failing case

comment:1 Changed 8 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [8405]) Fixed #8229: Added handling for a special case in the validation of Spanish ID numbers. Thanks to Marc Garcia for the patch.

comment:3 Changed 5 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

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