ICardFieldState

interface ICardFieldState

Interface representing the current state of a CardField. This is useful if you want to provide a custom error messages UI

Properties

isEmpty
Link copied to clipboard
abstract val isEmpty: Boolean

Whether or not the field has any text

isFocused
Link copied to clipboard
abstract val isFocused: Boolean

Whether or not the field currently has focus. Only one field can have focus at a time.

isValid
Link copied to clipboard
abstract val isValid: Boolean

Whether or not the field is in a valid state. There are some special considerations for postal code fields

wasEdited
Link copied to clipboard
abstract val wasEdited: Boolean

Whether or not the user has entered text in the field. This can be true even if the field is empty (e.g. if the user entered text and then deleted it)

wasFocused
Link copied to clipboard
abstract val wasFocused: Boolean

Whether or not the field had ever received focus