 import Bolts
 
 public class ParseBinder {
-
+    
     public init() {
         
     }

                }
            }
        }

    }

    public func noValidate(control: UITextField) -> (Bool, String?) {
        return (true, nil)
    }

    public func requiredValidator(errMsg: String) -> BaseValidator {
        return RequiredValidator(errMsg: errMsg)
    }

    public func regExValidator(regEx: String, errMsg: String) -> BaseValidator {
        return RegExValidator(errMsg: errMsg, regEx: regEx)
    }

    public func redErrMsg(control: UITextField, errMsg: [String]) {
        
        //Shake animation if wrong values are entered in the textfields

            control.layer.cornerRadius = 0.0
        }
    }
    
    public func convertToArray(partObj: PFObject, key: String) -> (UITextField) -> Void {
        
        return {
            
            (control) in
            
            (partObj as! SubClassedPFObjects).addValue(key, value: control.text)
            control.layer.borderColor = UIColor.clearColor().CGColor
            control.layer.borderWidth = 0.0
            control.layer.cornerRadius = 0.0
        }
    }
    
    
}

public class SubClassedPFObjects: PFObject {
    
    
    
    public func addValue(key: String, value: Any){
        
    }
}
