Module validator

Module validator 

Source
Expand description

Code validation module.

Provides functions for validating promotional codes, checking format, character validity, and Damm check digits.

Functionsยง

count_valid
Count valid codes in a batch.
is_valid
Quick boolean validation check.
partition_codes
Partition codes into valid and invalid.
validate
Validate a promotional code and return detailed result.
validate_batch
Batch validation of multiple codes.
validate_format
Validate code format only (length and characters), without checking the check digit.