ValidationError
public class ValidationError: NSObject
The ValidationError
class is used for representing errors of a failed validation. It contains the text field, error label, and error message of a failed validation.
-
the textField of the field
Declaration
Swift
public let textField:UITextField
-
the error label of the field
Declaration
Swift
public var errorLabel:UILabel?
-
the error message of the field
Declaration
Swift
public let errorMessage:String
-
Initializes
ValidationError
object with a textField and error.Declaration
Swift
public init(textField:UITextField, error:String)
Parameters
textField
UITextField that holds textField.
errorMessage
String that holds error message.
Return Value
An initialized object, or nil if an object could not be created for some reason that would not result in an exception.
-
Initializes
ValidationError
object with a textField, errorLabel, and errorMessage.Declaration
Swift
public init(textField:UITextField, errorLabel:UILabel?, error:String)
Parameters
textField
UITextField that holds textField.
errorLabel
UILabel that holds error label.
errorMessage
String that holds error message.
Return Value
An initialized object, or nil if an object could not be created for some reason that would not result in an exception.