validateExpiryDate

abstract fun validateExpiryDate(expiryMonth: String, expiryYear: String): ValidationResult<ExpiryDate>

Validates the given expiryMonth&expiryYear string values, checking the input is valid and that the representing expiry date is in the future.

Return

ValidationResult contains an ExpiryDate if the provided values are valid.

Parameters

expiryMonth
  • The year given in YY or YYYY format.


abstract fun validateExpiryDate(expiryMonth: Int, expiryYear: Int): ValidationResult<ExpiryDate>

Validates the given expiryMonth&expiryYear integer values, checking the input is valid and that the representing expiry date is in the future.

Return

ValidationResult contains an ExpiryDate if the provided values are valid.

Parameters

expiryMonth
  • The year given in YY or YYYY format.