Intervention / validation

Missing Laravel Validation Rules
https://validation.intervention.io
MIT License
590 stars 67 forks source link

Fixed issue when checksum remainder is 0 #56

Closed lasselehtinen closed 2 years ago

lasselehtinen commented 2 years ago

There was in issue with GTIN and EAN when the module remainder was zero. See Wikipedia for this special rule.

"Subtracted from 10, that leaves a result from 1 to 10. A zero replaces a ten, so, in all cases, a single check digit results."

Had to remove 0000000000000 === false from the tests, since technically it is now a valid GTIN/EAN. I also added a check that the value has to be numeric.

olivervogel commented 2 years ago

Thanks. I will merge asap.