Overview
A lightweight Dart package designed to validate credit card numbers and identify the card type (e.g., Visa, MasterCard). It checks for correct formatting and applies standard validation rules such as Luhn algorithm verification. The package is ideal for forms requiring real-time feedback on card input accuracy. It supports multiple card types and returns clear results without external dependencies. Perfect for mobile apps with payment or checkout flows.
Use cases
- Form validation in payment screens
- Real-time card number checking
- Identifying card type during input
- Secure payment data preprocessing
- Enhancing user experience in checkout flows
Key features
- Validates card numbers using Luhn algorithm
- Detects card type automatically
- Returns structured validation result
- Lightweight and dependency-free
- Supports major card networks
Suitable for
- Mobile apps with payment forms
- E-commerce applications
- User-friendly checkout interfaces
- Developers needing quick card validation
- Apps requiring immediate feedback on card input
Considerations
- Does not handle card expiration or CVV
- No support for international card formats beyond major networks
- Validation occurs only on input, not during transaction processing
- Not intended for secure storage of card data
- Requires manual integration into form logic