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 PhoneNumberCollector with the given phone number.

    Declaration

    Swift

    public override func initialize(with phoneNumber: Any)

    Parameters

    phoneNumber

    The phone number to initialize the collector with.

  • Returns the selected device type.

    Declaration

    Swift

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