{"size": 4091, "ext": "js", "max_stars_repo_path": "src/Sise/Bundle/CoreBundle/Resources/public/js/jquery.quickValidate.min.js", "max_stars_repo_name": "fareh/sise", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Sise/Bundle/CoreBundle/Resources/public/js/jquery.quickValidate.min.js", "max_issues_repo_name": "fareh/sise", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Sise/Bundle/CoreBundle/Resources/public/js/jquery.quickValidate.min.js", "max_forks_repo_name": "fareh/sise", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 4091.0, "max_line_length": 4091, "alphanum_fraction": 0.6638963579}
(function(e){e.fn.quickValidate=function(t){var n={"class":".quickValidate",errorRequired:"$name is a required field",errorMaxlength:"$name can only be $value characters long",errorMinlength:"$name must be at least $value character(s) long",errorNumber:"$name must be a number",errorInteger:"$name must be an integer",errorRange:"$name must be between $min and $max",errorEmail:"$name must be a valid email address",errorPhone:"$name must be a valid phone number",errorExpression:"$name is not valid",notificationClass:".notification",errorClass:".error",debug:false};var t=e.extend(n,t);return this.each(function(){function f(e){return e.charAt(0).toUpperCase()+e.slice(1)}var n=t;var r=this;var i=e(document).find(n.notificationClass);var s=/^\d+$/;var o=/^((\d+(\.\d *)?)|((\d*\.)?\d+))$/;var u=/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;var a=/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/;e(i).hide();var l={error:"",getErrorMessage:function(t,r,i,s,o){i=typeof i!=="undefined"?i:null;s=typeof s!=="undefined"?s:null;o=typeof o!=="undefined"?o:null;return n["error"+f(r)].replace("$name",e(t).attr("data-name")).replace("$value",i).replace("$min",s).replace("$max",o)},checkrequired:function(t){if(e(t).val()==""||e(t).val().length==0){l.error=l.getErrorMessage(t,"required");e(t).focus();return false}return true},checkmaxlength:function(t,n){if(e(t).val().length>=n){l.error=l.getErrorMessage(t,"maxlength",n);e(t).focus();return false}return true},checkminlength:function(t,n){if(e(t).val().length<=n&&e(t).val()!=""){l.error=l.getErrorMessage(t,"minlength",n);e(t).focus();return false}return true},checknumber:function(t){if(!s.test(e(t).val()||!o.test(e(t).val()))&&e(t).val()!=""){l.error=l.getErrorMessage(t,"number");e(t).focus();return false}return true},checkinteger:function(t){if(!s.test(e(t).val())&&e(t).val()!=""){l.error=l.getErrorMessage(t,"integer");e(t).focus();return false}return true},checkrange:function(t,n){if(l.checknumber(t,e(t).val())&&e(t).val()!=""){l.error=l.getErrorMessage(t,"range",null,r,i);var r=n.substr(0,n.indexOf("-"));var i=n.substr(n.indexOf("-")+1);if(parseFloat(e(t).val())<r||parseFloat(e(t).val())>i){l.error=l.getErrorMessage(t,"range",null,r,i)}else{return true}e(t).focus();return false}else{l.error=l.getErrorMessage(t,"number");e(t).focus();return false}},checkemail:function(t){if(!a.test(e(t).val())&&e(t).val()!=""){l.error=l.getErrorMessage(t,"email");e(t).focus();return false}return true},checkphone:function(t){if(!u.test(e(t).val())&&e(t).val()!=""){l.error=l.getErrorMessage(t,"phone");e(t).focus();return false}return true},checkexpression:function(t,n){var r=new RegExp(n);if(!r.test(e(t).val)&&e(t).val()!=""){l.error=l.getErrorMessage(t,"expression");e(t).focus();return false}return true},checkradio:function(t){var n=e(t).attr("name");e(r).find("input[name="+n+"]").each(function(){console.log(e(this).val())});if(!e(t).val()){return false}return false},init:function(){var t=true;l.error="";e(r).find(n.class).each(function(n){if(e(this).attr("data-validate")){var r=e(this).attr("data-validate").split(",");for(var i=0;i<r.length;i++){if(r[i].indexOf("=")==-1){t=l["check"+r[i]](this)}else{t=l["check"+r[i].substr(0,r[i].indexOf("="))](this,r[i].substr(r[i].indexOf("=")+1))}if(!t)return t}}});return t},showError:function(){e(i).find(n.errorClass).html(l.error);e(i).show()}};e(r).submit(function(){if(!l.init()){l.showError();return false}else if(n.debug){e(i).find("h2").html("Congtraulations!");e(i).find(n.errorClass).html("You have successfully validated a form, tell your friends.");e(i).show();return false}return true})})}})(jQuery)