IsoCodes
IsoCodes copied to clipboard
[meta-ticket] GS1 / GTIN code validator
http://www.gs1.org/how-calculate-check-digit-manually
- ~~GTIN-12~~
- ~~UPC-12~~
- ~~UPC-A~~
- ~~GTIN-13 (GLN)~~
- ~~GTIN-14~~
- ~~SSCC~~
- ~~GLN~~
- ~~GRAI~~
- ~~GIAI~~
- ~~GDTI~~
- ~~GSRN~~
- ~~UDI~~
- GS1-128 Structure
see:
- http://www.activebarcode.com/codes/?close=
- http://www.gtin.info/check-digit-calculator
- http://www.gs1-128.info
- http://www.epc-rfid.info
- http://www.databar-barcode.info
- http://www.udi-barcode.info
And:
- https://github.com/charithe/gtin-validator
- http://code.activestate.com/recipes/577963-gtin-validate-check-digit-or-add-check-digit/
- https://boapi.googlecode.com/svn/trunk/src/php/ (Apache License)
- http://codereview.stackexchange.com/questions/19438/upc-a-validation
These validators will return true for a string containing all zeroes (if the string length is correct). That edge case has to be either handled in the code or intentionally left like it is. No matter what you choose to do, this behavior needs to be documented somewhere where users can't miss it.
Thanks for reporting, @tbmatuka. Just shared fixes in #120 and tagged a new 2.1.2 version