FormatTextFieldDelegate

public protocol FormatTextFieldDelegate: UITextFieldDelegate

FormatTextField delegate that extends the UITextFieldDelegate and adds functionality for checking if text is valid on change.

  • Notifies the delegate that the text in the text field has changed

    Declaration

    Swift

    func formatTextFieldTextChange(_ textField: FormatTextField, text: String, isValid: Bool)

    Parameters

    textField

    The text field that had it’s text changed.

    text

    The new text that is present in the textField minus any formatting characters (such as parenthesis on a phone number).

    isValid

    Whether or not the text is valid as per the inputType parameter on the FormatTextField