secnot/django-isbn-field

EANs can validate as ISBNs

Opened this issue · 0 comments

Greetings @secnot and thank you for this repo.

I have encounter an issue where the field validation fails. EANs are the barcode versions of ISBNs, and there are scenarios where these numbers can pass an ISBN check sum, but still not be valid. 6610000352289, is one such example.

stdnum contains validation for EANs as well. Could you please add this validation check to prevent this from happening? I haven't come up with a good set of conditions to be absolutely sure it's an EAN and not an ISBN and vice versa (for instance, EANs can also start with 978 so that doesn't work), but perhaps the the algorithm is different between the two and that may suffice.

Thank you again!