koblas / stdnum-js

A JavaScript library to provide functions to handle, parse and validate standard numbers.
MIT License
38 stars 26 forks source link

Swiss SSN validation (EAN) checksum issue #94

Closed teebu closed 1 year ago

teebu commented 1 year ago

value: 756.9203.3850.60 expected result: valid

also checked here: https://teaddict.net/swiss-ssn.html https://www.getnewidentity.com/validate-ean.php (value without periods)

I think we seen this mod 10 = 0 issue in before in another validator. (10 - sum) % 10) ?

koblas commented 1 year ago

Good catch, that was the issue.