 import UIKit
 
 enum CKTextFieldValidationResult: Int {
-    case CKTextFieldValidationUnknown = 0, CKTextFieldValidationPassed, CKTextFieldValidationFailed
+    case Unknown = 0, Passed, Failed
 }
 
-@objc protocol CKTextFieldValidationDelegate: NSObjectProtocol {
-    optional func textField(textField: CKTextField, validationResult:Int, forText:String)
+protocol CKTextFieldValidationDelegate: NSObjectProtocol {
+    func textField(textField: CKTextField, validationResult:CKTextFieldValidationResult, forText:String)
 }
 
+/**
+ * TODO override didSet for textAlignment -> create leftView on the fly
+ * TODO override didSet for placeholder -> create placeholderLabel on the fly
+ */
 class CKTextField: UITextField, UITextFieldDelegate {
 
     // IB fields for attribute inspector

            }
        }
    }
    
    func shake() {
        self.layer.transform = CATransform3DMakeTranslation(10.0, 0.0, 0.0)

    @IBInspectable var maxValue: String?
    @IBInspectable var pattern: String?

    static let VALIDATION_TYPE_INTEGER = "integer"
    static let VALIDATION_TYPE_TEXT = "text"
    
    var validationDelegate: CKTextFieldValidationDelegate?
    
    override var delegate: UITextFieldDelegate? {
