MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/gvadelhincr/plugins/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/gvadelhincr/plugins/wt.validator.min.js
/**
 * Clientside validator module
 * @author WingArt team
 * @version 1.0
 **/
 ;var Validator=function(){function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a){this.errors=[];this.defOptions={form:null,cssPrefix:null,incorrectClass:"incorrect",correctClass:"valid",showValid:!0,rules:null,ajax:!0};this.options=g(this.defOptions,a);Object.defineProperties(this,{iClass:{get:function(){return this.options.cssPrefix?this.options.cssPrefix+this.options.incorrectClass:this.options.incorrectClass}},vClass:{get:function(){return this.options.cssPrefix?
this.options.cssPrefix+this.options.correctClass:this.options.correctClass}}});Object.defineProperty(this,"form",{get:function(){return this.options.form}});Object.defineProperty(this,"reset",{value:function(){this.errors=[];this.unbindErrors()}});Object.defineProperty(this,"test",{value:function(){for(var b=this.options.rules,c=!0,a=0;a<b.length;a++){var d=b[a].rules,e;for(e in d)this["test"+e](b[a].element,b[a].name,d[e])||(c=!1)}return c}});Object.defineProperty(this,"bindErrors",{value:function(){for(var b=
0;b<this.errors.length;b++){var c=this.errors[b].element,a=this.iClass;c.classList?c.classList.add(a):c.className+=" "+a}}});Object.defineProperty(this,"unbindErrors",{value:function(){for(var b=this.form.querySelectorAll("."+this.iClass),a=0;a<b.length;a++){var d=b[a],f=this.iClass;d.classList?d.classList.remove(f):d.className=d.className.replace(" "+f,"")}}});Object.defineProperty(this,"bindEvents",{value:function(){var b=this;if(!(this.form&&this.form instanceof HTMLFormElement))throw Error(" 'form' property in config object should be specified and should be instance of HTMLFormElement class");
this.form.addEventListener("submit",function(a){b.reset();b.options.ajax&&a.preventDefault();if(b.test())b.options.onCorrect.call(b.form);else return b.bindErrors(),b.options.onIncorrect.call(b.form,b.errorsList),a.preventDefault(),a.stopPropagation(),!1},!1)},configurable:!1,writable:!1});this.bindEvents()}Object.defineProperty(d.prototype,"testempty",{value:function(a,b){return a.value.length?!0:(this.errors.push({element:a,message:"Field '"+b+"' should be filled!"}),!1)}});Object.defineProperty(d.prototype,
"testpattern",{value:function(a,b,c){return(new RegExp(c)).test(a.value)?!0:(this.errors.push({element:a,message:"The value of field '"+b+"' is incorrect!"}),!1)}});Object.defineProperty(d.prototype,"testmin",{value:function(a,b,c){return a.value.length<c?(this.errors.push({element:a,message:"The amount of characters in '"+b+"' field should be grater than "+c+"!"}),!1):!0}});Object.defineProperty(d.prototype,"errorsList",{get:function(){var a="";this.errors.forEach(function(b,c,d){a+=b.message+"\r\n"});
return""===a?null:a}});return d}();

MMCT - 2023