 @IBDesignable class FloatLabelTextField: UITextField,UITextFieldDelegate {
     let animationDuration = 0.3
     var title = UILabel()
-    var hasError = false
+    private var hasError: Bool  = false
     private var hasShownError = false
     private var originalPlaceHolderText: String?
     private var validators =  [String: Any]()

    }


    func showError() {
        title.font = title.font.fontWithSize(errorFontSize)
        title.textColor = errorTextColor
        hasError = true

        title.frame = CGRect(x: x, y: title.frame.origin.y, width: frame.size.width, height: title.frame.size.height)
    }

    private func showTitle(animated: Bool) {
        let dur = animated ? animationDuration : 0
        UIView.animateWithDuration(dur, delay: 0, options: UIViewAnimationOptions.BeginFromCurrentState | UIViewAnimationOptions.CurveEaseOut, animations: {
            // Animation
