IIRC, to validate UPC, the EAN checksum validator can be used by prepending "0"; i.e.:
if len(barcode) == 12: ean_validate("0%s" % barcode) else: ean_validate(barcode)
Not sure about the other types, though. Being on the other side of the pond we pretty much just use UPC.
IIRC, to validate UPC, the EAN checksum validator can be used by prepending "0"; i.e.:
if len(barcode) == 12: "0%s" % barcode) barcode)
ean_validate(
else:
ean_validate(
Not sure about the other types, though. Being on the other side of the pond we pretty much just use UPC.