 
     // MARK: Layout
 
-    override func layoutSubviews() {
+    public override func layoutSubviews() {
         super.layoutSubviews()
         validate()
     }


    var hasEverResignedFirstResponder = false

    override func resignFirstResponder() -> Bool {
        hasEverResignedFirstResponder = true
        return super.resignFirstResponder()
    }

    let validationLabel = UILabel()

    var validationColor: UIColor = UIColor.redColor() {
        didSet {
            validationLabel.textColor = validationColor
        }
    }

    var validation: (String?) -> (Bool, String) = { _ in (true, "") }

    private func validate() {
        let (valid, errorString) = validation(text)

        })
    }

    override public func textRectForBounds(bounds:CGRect) -> CGRect {
        var r = super.textRectForBounds(bounds)
        var top = ceil(nameLabel.font.lineHeight)
        r = UIEdgeInsetsInsetRect(r, UIEdgeInsetsMake(top + topMargin + marginForContent, 0.0, -marginForContent, 0.0))
        return CGRectIntegral(r)
    }

    override public func editingRectForBounds(bounds:CGRect) -> CGRect {
        var r = super.editingRectForBounds(bounds)
        var top = ceil(nameLabel.font.lineHeight)
        r = UIEdgeInsetsInsetRect(r, UIEdgeInsetsMake(top + topMargin + marginForContent, 0.0, -marginForContent, 0.0))
