CardValidator class

Card Validator

Constructors

CardValidator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cleanCardNumber(String cardNumber) String
Removes whitespaces from credit card number
cleanCvn(String cardCvn) String
Removes whitespaces from cvn
getCardType(String cardNumber) CardType
Computes the card type based on the card number
isCardNumberValid(String cardNumber) bool
Determines whether the credit card number provided is valid
isCvnValid(String cardCVN) bool
Determines whether the card CVN is valid
isCvnValidForCardType(String? cardCVN, String? cardNumber) bool
Determines whether the card CVN length is valid
isExpiryValid(String? expirationMonth, String? expirationYear) bool
Determines whether the card expiration month and year are valid