ValidatedTextField

open class ValidatedTextField: BaseUITextField

ValidatedTextField is subclass of BaseUITextField with extra proporties to validate text input.

  • Bool flag for validating an empty text.

    Declaration

    Swift

    @IBInspectable open var validateEmpty:Bool = false;
  • Bool flag for validating a valid email text.

    Declaration

    Swift

    @IBInspectable open var validateEmail:Bool = false;
  • Bool flag for validating a valid phone number text.

    Declaration

    Swift

    @IBInspectable open var validatePhone:Bool = false;
  • Bool flag for validating a valid url text.

    Declaration

    Swift

    @IBInspectable open var validateURL:Bool = false;
  • Bool flag for validating a valid numaric input.

    Declaration

    Swift

    @IBInspectable open var validateNumeric:Bool = false;
  • Bool flag for validating a valid alphabetic input.

    Declaration

    Swift

    @IBInspectable open var validateAlphabetic:Bool = false;
  • Bool flag for validating a valid alphabetic input.

    Declaration

    Swift

    @IBInspectable open var validateRegex:String = "";
  • Validats minimum character limit.

    Declaration

    Swift

    @IBInspectable open var minChar:Int = 0;
  • Validats maximum character limit.

    Declaration

    Swift

    @IBInspectable open var maxChar:Int = 0;
  • Inspectable property for invalid sign image.

    Declaration

    Swift

    @IBInspectable open var invalidSign:UIImage? = nil
  • Validity msg for invalid input text. - Default text is ‘Invalid’ The msg can be a key of SyncEngine with a prefix ’#’

    Declaration

    Swift

    @IBInspectable open var validityMsg:String
  • Flag for whether the input is valid or not.

    Declaration

    Swift

    open var isValid:Bool
  • Overridden property to get text changes.

    Declaration

    Swift

    open override var text: String?
  • Overridden methed to update layout.

    Declaration

    Swift

    open override func layoutSubviews()
  • Overridden property to get text changes.

    Parameter

    Parameter textField: UITextField

    Declaration

    Swift

    open override func textFieldDidEndEditing(_ textField: UITextField)

    Parameters

    textField

    UITextField

  • Validats for an empty text

    Returns

    Bool flag for a valid input.

    Declaration

    Swift

    open func isEmpty()->Bool

    Return Value

    Bool flag for a valid input.