Vgs Min Max Date Validator
class VgsMinMaxDateValidator(minDate: Long, maxDate: Long, val dateFormat: VgsExpiryDateFormat, val errorMsg: String = ERROR_MESSAGE) : VgsTextFieldValidator
Validator that requires the parsed date to fall within an inclusive range.
Useful for card expiry fields to reject dates in the past or far in the future.
Parameters
min Date
earliest accepted date as a Unix timestamp in milliseconds.
max Date
latest accepted date as a Unix timestamp in milliseconds.
date Format
the format used to parse the field's text.
error Msg
message returned when the date is outside the range or unparsable.
Constructors
Link copied to clipboard
constructor(minDate: Long, maxDate: Long, dateFormat: VgsExpiryDateFormat, errorMsg: String = ERROR_MESSAGE)