Module gtin_validate::gtin14

source ·
Expand description

Performs validation and correction of GTIN-14 codes.

Enums

Errors that make GTIN-14 correction impossible.

Functions

Check that a GTIN-14 code is valid by confirming that it is exactly 14 digits in length and that the check-digit is correct.
Attempt to fix an invalid GTIN-14 code by stripping whitespace from the left and right sides and zero-padding the code if it is less than 14 digits in length.