PCI-DSS Payment Card Data
PCI_DSSfreeValidate payment card data — PAN Luhn check, masking compliance, expiration dates, and BIN format per PCI-DSS standards.
Checks included (12)
PAN Luhn Check Digit Validation(pan)
Validates that Primary Account Numbers (PANs) pass the Luhn algorithm (mod-10 checksum). A PAN must be 13-19 digits long, and the last digit must satisfy the Luhn check. This is a fundamental validation for payment card numbers per PCI-DSS and ISO/IEC 7812.
PAN Masking Validation(pan_masked)
Validates that Primary Account Numbers (PANs) are properly masked per PCI-DSS requirements. Only the first 6 digits (BIN/IIN) and last 4 digits may be displayed; all middle digits must be masked with X or * characters. This ensures cardholder data is not stored or displayed in the clear.
Card Expiration Date Format(card_expiry)
Validates that payment card expiration dates conform to the standard MM/YY or MMYY format. The month must be between 01 and 12. This rule checks format validity; business logic for past-date checks should be applied separately at the application layer.
Bank Identification Number (BIN/IIN) Format(bin)
Validates that Bank Identification Numbers (BINs), also known as Issuer Identification Numbers (IINs), conform to the correct format. A BIN is the first 6 to 8 digits of a payment card number and identifies the issuing institution. Per ISO/IEC 7812, the industry migrated from 6-digit to 8-digit BINs starting April 2022.
ISO Currency Code Validation(currency_code)
Validates that values are valid ISO 4217 currency codes (e.g., USD, EUR, GBP, JPY)
Card Number Tokenization Check(card_token)
Validates that stored card numbers are tokenized and not raw PANs. Values must NOT match a 13-19 consecutive digit pattern. Tokenized values typically contain non-numeric characters or are fixed-length alphanumeric tokens.
Column Not Null
Asserts that a specified column contains no null values. This is the most fundamental completeness check — every row must have a value present in the target column.
Column Completeness Threshold
Asserts that a column meets a minimum completeness threshold, measured as the percentage of non-null values. Useful when some nulls are acceptable but the overall population rate must stay above a defined level (e.g., 95%).
CVV/CVC Not Stored(cvv)
Validates that CVV/CVC/CID security codes are never stored post-authorization. The column must be NULL or empty for all rows. Storing CVV is explicitly prohibited by PCI-DSS even if encrypted.
Sensitive Authentication Data Not Stored(track_data)
Validates that sensitive authentication data (full magnetic stripe, PIN blocks, CVV2) is not stored after authorization. These columns must be NULL or empty in all post-authorization records.
Column Unique
Validates that all non-null values in a specified column are unique. Useful for natural keys, email addresses, identifiers, and any column where duplicates indicate a data quality issue.
Card Data Retention Period Check(card_expiry)
Validates that stored card data has not exceeded its retention period. Card expiry dates older than the configured limit (default 10 years) should be flagged for deletion per PCI-DSS data retention policies.