Module gtin_validate::gtin8

source ·
Expand description

Performs validation and correction of GTIN-8 codes.

Enums

Errors that make GTIN-8 correction impossible.

Functions

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