         The formatter to use before displaying content in the title label. This can be the `selectedTitle`, `deselectedTitle` or the `errorMessage`.
         The default implementation converts the text to uppercase.
     */
-    var titleFormatter:(String -> String) = { (text:String) -> String in
+    public var titleFormatter:(String -> String) = { (text:String) -> String in
         return text.uppercaseString
     }
     
     /**
         Identifies whether the text object should hide the text being entered.
     */
-    var secureTextEntry:Bool = false {
+    public var secureTextEntry:Bool = false {
         didSet {
             self.textField.secureTextEntry = secureTextEntry
             self.textField.fixCaretPosition()
         }
     }
     
-    /// The error message to display.
-    var errorMessage:String? {
+    /// A String value for the error message to display.
+    public var errorMessage:String? {
         didSet {
             self.updateControl(true)
         }
     }
+    
+    /// A Boolean value that determines whether the receiver discards `errorMessage` when the text input is changed.
+    public var discardsErrorMessageOnTextChange:Bool = true
     
     /// A Boolean value that determines whether the receiver is enabled.
     override public var enabled:Bool {

        return CGRectMake(offsetX, titleHeight, bounds.size.width - offsetX, bounds.size.height - titleHeight)
    }
    
    // MARK: - textfield delegate

    public func textFieldDidBeginEditing(textField: UITextField) {
        self.updateControl(true)
        if let delegate = self.delegate {
            delegate.watermarkedTextFieldDidBeginEditing(self)
        }
    }
    public func textFieldDidEndEditing(textField: UITextField) {
        self.updateControl(true)
        if let delegate = self.delegate {
            delegate.watermarkedTextFieldDidEndEditing(self)
        }
    }

    public func textFieldShouldReturn(textField: UITextField) -> Bool {
        if let delegate = self.delegate {
            return delegate.watermarkedTextFieldShouldReturn(self)
        }
        return true
    }

        }
    }
    
    // MARK: - Positioning Overrides
    
    private func titleLabelRectForBounds(bounds:CGRect) -> CGRect {
        return self.titleLabelRectForBounds(bounds, editing: self.editing)
    }
    
