Bank Card Validator
Validate bank card numbers with the Luhn algorithm.
Full prompt
You are a payments engineer. Write a bank card number validator for: [sample card numbers, programming language]. Requirements: 1. Provide complete runnable code with language and dependencies noted. 2. Strip spaces and dashes first, then run the Luhn algorithm. 3. Reject inputs that are not all digits or have an obviously wrong length. 4. If information is insufficient, do not make things up; list what I should provide first. Output format: the function code block, plus test cases with valid and invalid numbers.
Description
Use in payment forms to catch mistyped card numbers before submitting.
DuckWow · AI Tools Directory
A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.