A simple Android project for validating card details (Card Number, CVC/CVV, Expiration Date). Written in Kotlin.
Comes with
CardUtilTest
test class for you to see it at work in a glance.
- Length (supported length is minimum of 12, maximum of 19)
- Card type/brand (By default, all card types are supported but you can also set the library to support only your choice of card types)
- Types/Brands supported: Visa, MasterCard, AmericanExpress, DinersClub, Discover, JCB
- Luhn algorithm / Modulus 10
- Check for input to be > 0
- Length (supported length is 3-4 digits)
- Check for month input to be within the range 1-12
- Check for year input to be > 0
- Check for lapsed MM/YYYY input
- Customizable views for Card Number, CVC/CVV, and Expiration Date