validateDate method

bool validateDate()

Checks whether or not the {@link #expMonth} and {@link #expYear} fields represent a valid expiry date.

@return {@code true} if valid, {@code false} otherwise

Implementation

bool validateDate() {
  return _ccValidator
      .validateExpDate(
      '${expMonth.toString().padLeft(2, '0')}/${expYear.toString().padLeft(2, '0')}')
      .isValid;
}