CreditCardValidator class

CreditCardValidator helps with validating credit card numbers, expiration dates, and security codes. It is meant to validate the credit card as the user is typing in the card information This class is meant to be used as a mixin and is not inheritable For example: class CreditCardValidationBloc extends Object with CreditCardValidator Will allow access to the functions mentioned below Exposes 3 public functions which can be used to validate different parts of the credit card 1) Card number - validated based on type of card, luhn validity & card number length 2) Expiration Date - validated based on the date being a valid string & not expiring more than 'n' years in the future. 'n' defaults to 19 years. 3) Security code (CVV) - validates based on the length of the code in conjunction with the type of card


hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.
validateCCNum(String ccNumStr) CCNumValidationResults
Validates a credit card number that is passed in as a string The string may have spaces or hyphens but no letters
validateExpDate(String expDateStr) ValidationResults
Validates the card's expiration date based on the standard that no credit cards
validateSecurityCode(String code) ValidationResults
Validates the card's security code based on the card type. Default is 3 digits but Amex is the only card provider with security codes that are 4 digits


operator ==(Object other) bool
The equality operator. [...]