FA-72758 / Check-digit algorithms / Member archive
Amex prefix test uses a range · case 03
Diners-style 35 and 36 prefixes with 15 digits are routed to amex.
Case contract
Card number screening: spaces removed, nonempty ASCII digits required (else "malformed"). Network by prefix and length: visa 4 with 13/16/19 digits; amex 34 or 37 with 15; mastercard 51-55 or 2221-2720 with 16; discover 6011, 644-649 or 65 with 16-19; otherwise "unknown". Return [network, Luhn validity].
Why this case matters
Checkout forms route card numbers to the right processor and reject Luhn failures before authorization.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["351552971521401"] | ["amex", true] | ["unknown", true] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗