         }
     }
 
-    public var valid: Bool = true {
-        didSet {
-            if self.enabled {
-                self.updateValid(self.valid)
-            }
-        }
-    }
+    private(set) public var valid: Bool = true
 
     public var inputType: FormTextFieldInputType {
         didSet {


        if self.valid == false {
            self.valid = true
        }

        self.textFieldDelegate?.formTextField?(self, didUpdateWithText: self.text)

            self.layer.borderColor = self.invalidBorderColor.CGColor
            self.textColor = self.invalidTextColor
        }

        if self.isFirstResponder() {
            self.updateActive(true)
        }
    }

    public func validate(updatingUI updatingUI: Bool = true) -> Bool {
        var isValid = true
        if let inputValidator = self.inputValidator {
            isValid = inputValidator.validateString(self.text ?? "")
        }

        self.valid = isValid
        if self.enabled && updatingUI {
            self.updateValid(self.valid)
        }

        return isValid
    }
