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: Marc Garcia Owned by: Marc Garcia
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:

Description

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 Marc Garcia 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 Marc Garcia

Attachment: 8229.diff added

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

comment:1 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(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

Milestone 1.0 deleted

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