credit_form/validation library

Functions

isCreditExpiryOnOrAfterMonth(String value, {DateTime? at}) bool
True when value is valid MM/YY and the expiry month is still current or in the future relative to at (defaults to DateTime.now). Cards are treated as valid through the last day of the printed month.
isLikelyAmexCardDigits(String digitsOnly) bool
Returns true when digits-only input is consistent with an Amex PAN prefix.