PhoneNumberCollector

open class PhoneNumberCollector : FieldCollector<[String : Any]>, @unchecked Sendable

A collector for phone number.

  • default country code

    Declaration

    Swift

    public private(set) var defaultCountryCode: String { get }
  • validate phone number

    Declaration

    Swift

    public private(set) var validatePhoneNumber: Bool { get }
  • country code

    Declaration

    Swift

    public var countryCode: String
  • phone number

    Declaration

    Swift

    public var phoneNumber: String
  • Initializes a new instance of PhoneNumberCollector with the given JSON input.

    Declaration

    Swift

    public required init(with json: [String : Any])
  • Initializes the collector’s values. The input can be a dictionary containing both phone number and country code, or a simple string for just the phone number.

    Declaration

    Swift

    public override func initialize(with input: Any)

    Parameters

    input

    The value to initialize the collector with.

  • Returns the selected device type.

    Declaration

    Swift

    override open func payload() -> [String : Any]?