[][src]Module gtin_validate::gtin12

Performs validation and correction of GTIN-12 and UPC-A codes.

Enums

FixError

Errors that make GTIN-12 correction impossible.

Functions

check

Check that a UPC-A code is valid by confirming that it is made of exactly 12 digits and that the check-digit is correct.

fix

Attempt to fix invalid UPC codes by stripping whitespace from the left and right sides and zero-padding the UPC if it is less than 12 digits in length.