gustavo-frizzo/CreditCardValidator ? reverse-engineered prompt
Reverse engineered prompt
Build me a C# library for validating and generating credit card numbers.
I want to be able to pass in a card number as a string, even if it has spaces, and have the library clean it up, tell me if it is valid, identify the card brand like Visa, Mastercard, American Express, and so on, and check it with the Luhn algorithm. It should also let me generate random valid card numbers for testing, either for a specific card type or with a chosen valid length when that makes sense.
Please include simple helpers that make it easy to use from strings, like getting the brand name or checking whether a number matches a specific issuer. Keep it straightforward and usable in real projects, with sensible defaults and clear behavior for the common card types already supported in the README. If you need to look up current docs or examples while building it, go ahead and do that.
Are you gonna build this?
make sure you review the code using coderabbit