VisualPhoneNumberInputItem

public struct VisualPhoneNumberInputItem: VisualItemRepresentable

The associated value of a VisualItem of type .phoneInput.

  • id

    The ID representing this input text

    Declaration

    Swift

    public let id: String?
  • Label of the field (to be rendered)

    Declaration

    Swift

    public let label: String
  • The country code for this phone number

    Declaration

    Swift

    public let country: Country?
  • Optional text to show before the users enters data

    Declaration

    Swift

    public let placeholder: String?
  • Whether or not this is a mandatory field that should be filled in

    Declaration

    Swift

    public let required: Bool
  • Declaration

    Swift

    public var requiresStore: Bool
  • This receives an input from the user and needs to store it

    Declaration

    Swift

    public var initialStoreValue: VisualInputValue?
  • Create a VisualPhoneNumberInputItem.

    Declaration

    Swift

    public init(id: String?, label: String, country: Country?, phoneNumber: String?, placeholder: String?, required: Bool?)

    Parameters

    id

    The id for this input

    label

    The label for this input

    country

    the Country

    phoneNumber

    The initial phoneNumber

    placeholder

    the optional placeholder to show

    required

    whether or not this input is required

  • Create a VisualPhoneNumberInputItem from attributes.

    Declaration

    Swift

    public init?(attributes: AnyObject?)

    Parameters

    attributes

    the attributes (label, placeholder, required)

  • Declaration

    Swift

    public func payload(for value: VisualInputValue) -> String?
  • Declaration

    Swift

    public func validateValue(value: VisualInputValue?) -> (Bool, PayloadValidationError?)