gtin-validate 1.2.0

Validate GTIN barcodes including UPC-A and EAN-13. This module has built-in support for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), and GTIN-14 codes.
Documentation

Validate GTIN-style barcodes, including the commonly-used UPC-A and EAN-13 codes.

In addition to validating the correctness of the codes, you can attempt to automatically repair the most common errors, such as the removal of leading zeroes by spreadsheet software (because the codes are sometimes treated as integers) and the removal of whitespace that can be accidentally introduced during data entry or spreadsheet conversion.