credit_card_validator
2.1.0, released 3 years ago by an unverified publisher
Validates credit card numbers, expiration dates, and CVVs based on card type.
What it does
Validates credit card numbers, expiration dates, and security codes (CVV/CVC) in real time while typing. It also identifies the credit card type and supports custom credit card definitions.
AI-written summary of version 2.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to validate credit card inputs in a checkout form as the user types.
- You want to detect the credit card network/type from the card number.
Skip it when
- You need actual payment processing or server-side bank verification.
- You require robust form builders that handle more than just credit card fields.
Strengths
- Supports 'potentially valid' input states for live UI feedback during typing.
- Supports multiple popular credit card networks and custom card definitions.
Weaknesses
- Does not verify card information with a bank or payment processor.
- Limited documentation on all configuration options outside the basic README.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:credit_card_validator/credit_card_validator.dart';
final _ccValidator = CreditCardValidator();
var ccNumResults = _ccValidator.validateCCNum(ccNum);Alternatives
Packages that do the same job and could replace credit_card_validator.
- fancy_credit_card_input
A highly customizable credit card input field with built-in animations and card brand detection.
74Compare - sms_autofill
Flutter plugin to provide SMS code autofill support.
80Compare - flutter_multi_formatter
Input formatters for international phone numbers, credit/debit cards, currencies, and custom masks.
75Compare - best_form_validator
Zero-initialization form field validators for Flutter with 52 countries and 25 languages.
72Compare
Works with
Packages commonly used together with credit_card_validator: ones it builds on, ones built on it, and its own family.