     @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? {

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

import UIKit

enum CKTextFieldValidationResult: Int {
    case Unknown = 0, Passed, Failed
}

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
