OPCardFieldStateProtocol

@objc
public protocol OPCardFieldStateProtocol : NSObjectProtocol

Protocol representing the state of a credit card field (card number, expiration, cvv, postal code).

  • Whether or not the field is valid

    Declaration

    Swift

    var isValid: Bool { get }
  • Whether or not the field is empty

    Declaration

    Swift

    var isEmpty: Bool { get }
  • Whether or not the field has ever not been empty. Once true, it will not change back to false

    Declaration

    Swift

    var wasEdited: Bool { get }
  • Whether or not the field is currenlty the first responder

    Declaration

    Swift

    var isFirstResponder: Bool { get }
  • Whether or not the field has ever been the first responder. Once true, it will not change back to false

    Note

    This only gets set to true if the field lost first responder status while wasEdited was true.

    Declaration

    Swift

    var wasFirstResponder: Bool { get }