ValidationError

public class ValidationError: NSObject

The ValidationError class is used for representing errors of a failed validation. It contains the field, error label, and error message of a failed validation.

  • the Validatable field of the field

    Declaration

    Swift

    public let field:ValidatableField
  • 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 field, errorLabel, and errorMessage.

    Declaration

    Swift

    public init(field:ValidatableField, errorLabel:UILabel?, error:String)

    Parameters

    field

    Validatable field that holds field.

    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.