ExpirationDateTextFieldEvent

Sealed interface representing events triggered by the expiration date text field. This interface defines various events that can occur during expiration date input, providing real-time feedback about the input state and validation.

The events include focus changes, input completion, validation status, and length changes, all of which help in providing a smooth expiration date input experience.

Example:

// Handle expiration date events
when (event) {
is ExpirationDateTextFieldEvent.OnFocusChanged -> {
if (event.isFocused) {
// Show date format hint
}
}
is ExpirationDateTextFieldEvent.IsValid -> {
if (event.isValid) {
// Enable next step
}
}
is ExpirationDateTextFieldEvent.OnInputFilled -> {
if (event.isFilled) {
// Handle complete input
}
}
}

See also

Inheritors

Types

Link copied to clipboard
data class IsValid(val isValid: Boolean) : ExpirationDateTextFieldEvent

Event triggered when the expiration date validation status changes. This event indicates whether the entered date is valid according to the validation rules, including checks for past dates and valid month values.

Link copied to clipboard

Event triggered when the focus state of the expiration date field changes. This event helps manage the visual state of the input field and can be used to show/hide additional UI elements based on focus.

Link copied to clipboard

Event triggered when the expiration date input is completely filled. This event indicates whether all required digits for the selected date format have been entered.

Link copied to clipboard

Event triggered when the length of the expiration date input changes. This event helps track the progress of date input and can be used to update UI elements like progress indicators.