VGSExpDateTextFieldRepresentable

@MainActor
public struct VGSExpDateTextFieldRepresentable : UIViewRepresentable, VGSExpDateTextFieldRepresentableProtocol, VGSTextFieldRepresentableCallbacksProtocol

A SwiftUI wrapper for VGSExpDateTextField collecting card expiration date (MM / YY or MM / YYYY) with a picker, supporting brand-aware formatting.

Features:

  • Configurable month & year display formats.
  • Chainable UI configuration & secure entry toggle.
  • State & editing callbacks for validation monitoring.

Security:

  • Expiration date treated as sensitive until tokenized; avoid persisting raw values.
  • Picker prevents selection of past months in current year.

TextField interaction callbacks

Initialization

Configuration methods

  • Set UIFont value.

    Declaration

    Swift

    @MainActor
    public func font(_ font: UIFont) -> VGSExpDateTextFieldRepresentable
  • Set placeholder string.

    Declaration

    Swift

    @MainActor
    public func placeholder(_ text: String) -> VGSExpDateTextFieldRepresentable
  • Set attributedPlaceholder string.

    Declaration

    Swift

    @MainActor
    public func attributedPlaceholder(_ text: NSAttributedString?) -> VGSExpDateTextFieldRepresentable
  • Set UITextAutocorrectionType type.

    Declaration

    Swift

    @MainActor
    public func autocorrectionType(_ type: UITextAutocorrectionType) -> VGSExpDateTextFieldRepresentable
  • Set UITextAutocapitalizationType type.

    Declaration

    Swift

    @MainActor
    public func autocapitalizationType(_ type: UITextAutocapitalizationType) -> VGSExpDateTextFieldRepresentable
  • Set UITextSpellCheckingType type.

    Declaration

    Swift

    @MainActor
    public func spellCheckingType(_ type: UITextSpellCheckingType) -> VGSExpDateTextFieldRepresentable
  • Set UIEdgeInsets insets.

    Declaration

    Swift

    @MainActor
    public func textFieldPadding(_ insets: UIEdgeInsets) -> VGSExpDateTextFieldRepresentable
  • Set NSTextAlignment type.

    Declaration

    Swift

    @MainActor
    public func textAlignment(_ alignment: NSTextAlignment) -> VGSExpDateTextFieldRepresentable
  • Set isSecureTextEntry value.

    Declaration

    Swift

    @MainActor
    public func setSecureTextEntry(_ secure: Bool) -> VGSExpDateTextFieldRepresentable
  • Set adjustsFontForContentSizeCategory value.

    Declaration

    Swift

    @MainActor
    public func adjustsFontForContentSizeCategory(_ adjusts: Bool) -> VGSExpDateTextFieldRepresentable
  • Set keyboardAccessoryView view.

    Declaration

    Swift

    @MainActor
    public func keyboardAccessoryView(_ view: UIView?) -> VGSExpDateTextFieldRepresentable
  • Set textFieldAccessibilityLabel string.

    Declaration

    Swift

    @MainActor
    public func textFieldAccessibilityLabel(_ label: String) -> VGSExpDateTextFieldRepresentable
  • Set foregroundColor.

    Declaration

    Swift

    @MainActor
    public func foregroundColor(_ color: UIColor) -> VGSExpDateTextFieldRepresentable
  • Set backgroundColor.

    Declaration

    Swift

    @MainActor
    public func backgroundColor(_ color: UIColor) -> VGSExpDateTextFieldRepresentable
  • Set borderColor and lineWidth.

    Declaration

    Swift

    @MainActor
    public func border(color: UIColor, lineWidth: CGFloat) -> VGSExpDateTextFieldRepresentable
  • Set cornerRadius.

    Declaration

    Swift

    @MainActor
    public func cornerRadius(_ cornerRadius: CGFloat) -> VGSExpDateTextFieldRepresentable
  • Coordinates connection between scan data and text field.

    Declaration

    Swift

    @MainActor
    public func cardScanCoordinator(_ coordinator: VGSCardScanCoordinator) -> VGSExpDateTextFieldRepresentable

VGSExpDateTextField specific methods

Handle editing events