Module gtin_validate::gtin13

source ·
Expand description

Performs validation and correction of GTIN-13 and EAN-13 codes.

Enums

Errors that make GTIN-13 correction impossible.

Functions

Check that a GTIN-13 code is valid by checking the length (should be exactly 13 digits) and that the check-digit is correct.
Attempt to fix an invalid GTIN-13 code by stripping whitespace from the let and right sides and zero-padding the code if it is less than 13 digits in length.