API ReferenceFunctions
isValidGtin()
@finopenpos/fiscal / isValidGtin
function isValidGtin(gtin): boolean;Defined in: gtin.ts:39
Validate a GTIN-8/12/13/14 barcode number.
- Empty string and 'SEM GTIN' are considered valid (exempt).
- Valid GTIN-8/12/13/14 with correct check digit returns true.
- Non-numeric input or invalid check digit throws an error.
Parameters
| Parameter | Type |
|---|---|
gtin | string |
Returns
boolean