From 3686e592d4df94cb0e4d46f071eefb1cdd62b081 Mon Sep 17 00:00:00 2001 From: happyshi0402 Date: Tue, 29 May 2018 22:49:59 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/zh.js | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/lang/zh.js diff --git a/src/lang/zh.js b/src/lang/zh.js new file mode 100644 index 0000000..53b3e90 --- /dev/null +++ b/src/lang/zh.js @@ -0,0 +1,79 @@ +/** + * jQuery Form Validator + * ------------------------------------------ + * + * China language package + * + * @website http://formvalidator.net/ + * @license MIT + */ +(function($, window) { + + 'use strict'; + + $.formUtils.registerLoadedModule('lang/vi'); + + $(window).bind('validatorsLoaded', function() { + + $.formUtils.LANG = { + errorTitle: '表单提交失败!', + requiredField: '这是个必填字段', + requiredFields: '您没有回答完所有的问题', + badTime: '您填写了一个错误的时间', + badEmail: '您填写的邮箱地址格式错误', + badTelephone: '您填写的手机号格式错误', + badSecurityAnswer: '您填写的答案错误', + badDate: '您填写的日期错误', + lengthBadStart: '填写的值必须在 ', + lengthBadEnd: ' 字符', + lengthTooLongStart: '填写的值要大于 ', + lengthTooShortStart: '填写的值要小于 ', + notConfirmed: '输入的内容不一致', + badDomain: '错误的域名', + badUrl: '不是一个正确的URL', + badCustomVal: '输入的值不正确', + andSpaces: ' 和字符 ', + badInt: '输入的值不是一个正确的整数', + badSecurityNumber: '您的信用卡卡号不正确', + badUKVatAnswer: '错误的 UK VAT Number', + badUKNin: '错误的 UK NIN', + badUKUtr: '错误的 UK UTR Number', + badStrength: '密码太弱', + badNumberOfSelectedOptionsStart: '您至少要选择 ', + badNumberOfSelectedOptionsEnd: ' 选项', + badAlphaNumeric: '填写的值只能是字母数字的组合 ', + badAlphaNumericExtra: ' 和 ', + wrongFileSize: '您要上传的文件太大(最大 %s)', + wrongFileType: '文件类型是 %s 才被允许上传', + groupCheckedRangeStart: '请选择范围在 ', + groupCheckedTooFewStart: '请至少选择 ', + groupCheckedTooManyStart: '请最多选择 ', + groupCheckedEnd: ' 项目(s)', + badCreditCard: '信用卡号码不正确', + badCVV: 'CVV 号码不正确', + wrongFileDim : '图像尺寸错误,', + imageTooTall : '图像不能高于', + imageTooWide : '图像不能宽于', + imageTooSmall : '图像太小', + min : '最小', + max : '最大', + imageRatioNotAccepted : '图片的比列不允许', + badBrazilTelephoneAnswer: '手机号格式错误', + badBrazilCEPAnswer: 'CEP 输入无效', + badBrazilCPFAnswer: 'CPF 输入无效', + badPlPesel: 'PESEL 输入无效', + badPlNip: 'NIP 输入无效', + badPlRegon: 'The REGON 输入无效', + badreCaptcha: 'Please confirm that you are not a bot', + passwordComplexityStart: '密码必须至少要包含 ', + passwordComplexitySeparator: ', ', + passwordComplexityUppercaseInfo: ' 大写字母(s)', + passwordComplexityLowercaseInfo: ' 小写字母(s)', + passwordComplexitySpecialCharsInfo: ' 特殊字符(s)', + passwordComplexityNumericCharsInfo: ' 数字字符(s)', + passwordComplexityEnd: '.' + }; + + }); + +})(jQuery, window); From 3c96f55afd3fcd508327f97d0f2db803ae8fb2ef Mon Sep 17 00:00:00 2001 From: happyshi0402 Date: Tue, 29 May 2018 22:53:47 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/zh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/zh.js b/src/lang/zh.js index 53b3e90..52bb93e 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -63,7 +63,7 @@ badBrazilCPFAnswer: 'CPF 输入无效', badPlPesel: 'PESEL 输入无效', badPlNip: 'NIP 输入无效', - badPlRegon: 'The REGON 输入无效', + badPlRegon: 'REGON 输入无效', badreCaptcha: 'Please confirm that you are not a bot', passwordComplexityStart: '密码必须至少要包含 ', passwordComplexitySeparator: ', ', From 35f51fcc4e5eceb76e877dd79e432f8c885f7e8e Mon Sep 17 00:00:00 2001 From: happyshi0402 Date: Tue, 29 May 2018 22:54:10 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/zh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/zh.js b/src/lang/zh.js index 52bb93e..9149277 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -11,7 +11,7 @@ 'use strict'; - $.formUtils.registerLoadedModule('lang/vi'); + $.formUtils.registerLoadedModule('lang/zh'); $(window).bind('validatorsLoaded', function() { From f8a2c60b4c5230aa41ab4570175f0a410f31070a Mon Sep 17 00:00:00 2001 From: happyshi0402 Date: Tue, 29 May 2018 22:56:07 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=AF=B7=E7=A1=AE=E8=AE=A4=E4=BD=A0?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E6=9C=BA=E5=99=A8=E4=BA=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/zh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/zh.js b/src/lang/zh.js index 9149277..735d510 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -64,7 +64,7 @@ badPlPesel: 'PESEL 输入无效', badPlNip: 'NIP 输入无效', badPlRegon: 'REGON 输入无效', - badreCaptcha: 'Please confirm that you are not a bot', + badreCaptcha: '请确认你不是机器人', passwordComplexityStart: '密码必须至少要包含 ', passwordComplexitySeparator: ', ', passwordComplexityUppercaseInfo: ' 大写字母(s)', From 6d7a5fc69bdd92dce18199be6cb766d69bc4d478 Mon Sep 17 00:00:00 2001 From: happyshi0402 Date: Tue, 29 May 2018 22:57:13 +0800 Subject: [PATCH 5/6] =?UTF-8?q?UK=20=E5=8F=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/zh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lang/zh.js b/src/lang/zh.js index 735d510..c7f8a14 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -35,9 +35,9 @@ andSpaces: ' 和字符 ', badInt: '输入的值不是一个正确的整数', badSecurityNumber: '您的信用卡卡号不正确', - badUKVatAnswer: '错误的 UK VAT Number', + badUKVatAnswer: '错误的 UK VAT 号码', badUKNin: '错误的 UK NIN', - badUKUtr: '错误的 UK UTR Number', + badUKUtr: '错误的 UK UTR 号码', badStrength: '密码太弱', badNumberOfSelectedOptionsStart: '您至少要选择 ', badNumberOfSelectedOptionsEnd: ' 选项', From 78c68863b6f3b4d623ef1437927c4700366cbc48 Mon Sep 17 00:00:00 2001 From: wangshifeng Date: Wed, 30 May 2018 09:43:06 +0800 Subject: [PATCH 6/6] 2.3.79 chinese add --- README.md | 13 +++++++------ form-validator/brazil.js | 2 +- form-validator/color.js | 2 +- form-validator/date.js | 2 +- form-validator/file.js | 4 ++-- form-validator/html5.js | 2 +- form-validator/jquery.form-validator.js | 19 ++++++++++++++++++- form-validator/jquery.form-validator.min.js | 6 +++--- form-validator/jsconf.js | 2 +- form-validator/lang/ar.js | 2 +- form-validator/lang/ca.js | 2 +- form-validator/lang/cs.js | 2 +- form-validator/lang/da.js | 2 +- form-validator/lang/de.js | 2 +- form-validator/lang/es.js | 2 +- form-validator/lang/fa.js | 2 +- form-validator/lang/fr.js | 2 +- form-validator/lang/it.js | 2 +- form-validator/lang/ka.js | 2 +- form-validator/lang/ko.js | 2 +- form-validator/lang/nl.js | 2 +- form-validator/lang/no.js | 2 +- form-validator/lang/pl.js | 2 +- form-validator/lang/pt.js | 2 +- form-validator/lang/ro.js | 2 +- form-validator/lang/ru.js | 2 +- form-validator/lang/sv.js | 2 +- form-validator/lang/tr.js | 2 +- form-validator/lang/vi.js | 2 +- form-validator/lang/zh.js | 9 +++++++++ form-validator/location.js | 2 +- form-validator/logic.js | 2 +- form-validator/poland.js | 2 +- form-validator/sanitize.js | 4 ++-- form-validator/security.js | 2 +- form-validator/sepa.js | 2 +- form-validator/sweden.js | 2 +- form-validator/toggleDisabled.js | 2 +- form-validator/uk.js | 2 +- formvalidator.jquery.json | 2 +- package.json | 2 +- 41 files changed, 76 insertions(+), 49 deletions(-) create mode 100644 form-validator/lang/zh.js diff --git a/README.md b/README.md index aa567b8..750c79c 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Read the documentation for the default features at [http://formvalidator.net/#de * **strength** — *Validate the strength of a password* * **server** — *Validate value of input on server side* * **letternumeric** — *Validate that the input value consists out of only letters and/or numbers* - * **recaptcha** - *Validate Google [reCaptcha 2](https://www.google.com/recaptcha/intro/index.html)* + * **recaptcha** - *Validate Google [reCaptcha 2](https://www.google.com/recaptcha/intro/index.html)* Read the documentation for the security module at [http://formvalidator.net/#security-validators](http://formvalidator.net/#security-validators) @@ -133,8 +133,8 @@ Read the documentation for the Swedish module at [http://formvalidator.net/#swed ### Module: uk * **ukvatnumber** - * **uknin** - * **ukutr** + * **uknin** + * **ukutr** Read the documentation for the UK module at [http://formvalidator.net/#uk-validators](http://www.formvalidator.net/#country-specific-validators_uk) @@ -143,12 +143,12 @@ Read the documentation for the UK module at [http://formvalidator.net/#uk-valida * **cep** * **cpf** -### Module: poland +### Module: poland * **plpesel** - *validate polish personal identity number (in Polish identity cards)* * **plnip** - *validate polish VAT identification number* * **plregon** - *validate polish bussiness identity number* - -### Module: color + +### Module: color * **hex** - *validate hex color format* * **rgb** - *validate rgb color format* * **rgba** - *validate rgba color format* @@ -265,6 +265,7 @@ You can cause an element to be validated upon the firing of an event, by attachi This plugin comes with translations for English, Polish, Romanian, + Chinese, Danish, Norwegian, Dutch, diff --git a/form-validator/brazil.js b/form-validator/brazil.js index 6b6fc84..12d9e1b 100644 --- a/form-validator/brazil.js +++ b/form-validator/brazil.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/color.js b/form-validator/color.js index 2a891e4..b7f8a17 100644 --- a/form-validator/color.js +++ b/form-validator/color.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/date.js b/form-validator/date.js index 350ee2c..ad744d3 100644 --- a/form-validator/date.js +++ b/form-validator/date.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/file.js b/form-validator/file.js index 9130cd0..0e887a6 100644 --- a/form-validator/file.js +++ b/form-validator/file.js @@ -1,9 +1,9 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){a.formUtils.registerLoadedModule("file");var c="undefined"!=typeof b.FileReader,d=function(b){var c=a.split((b.valAttr("allowing")||"").toLowerCase());return a.inArray("jpg",c)>-1&&a.inArray("jpeg",c)===-1?c.push("jpeg"):a.inArray("jpeg",c)>-1&&a.inArray("jpg",c)===-1&&c.push("jpg"),c},e=function(a,b,c,d){var e=d[b]||"";a.errorMessageKey="",a.errorMessage=e.replace("%s",c)},f=function(c,d,e){var f=new FileReader,g=new Image;f.readAsDataURL(c),f.onload=function(c){g.onload=function(){a(b).trigger("imageValidation",[this]),d(this)},g.onerror=function(){e()},g.src=c.target.result}};a.formUtils.addValidator({name:"mime",validatorFunction:function(b,f,g,h){if(c){var i=!0,j=f.get(0).files||[],k="",l=d(f);return j.length&&(a.each(j,function(b,c){return i=!1,k=c.type||c.name.substring(c.name.lastIndexOf(".")+1),a.each(l,function(a,b){if(i=k.indexOf(b)>-1)return!1}),i}),i||(a.formUtils.warn("Trying to upload a file with mime type "+k+" which is not allowed"),e(this,"wrongFileType",l.join(", "),h))),i}return a.formUtils.warn("FileReader not supported by browser, will check file extension"),a.formUtils.validators.validate_extension.validatorFunction(b,f,g,h)},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"extension",validatorFunction:function(b,c,f,g){var h=!0,i=this,j=d(c);return a.each(c.get(0).files||[b],function(b,c){var d="string"==typeof c?c:c.value||c.fileName||c.name,f=d.substr(d.lastIndexOf(".")+1);if(a.inArray(f.toLowerCase(),j)===-1)return h=!1,e(i,"wrongFileType",j.join(", "),g),!1}),h},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"size",validatorFunction:function(b,d,f,g){var h=d.valAttr("max-size");if(!h)return a.formUtils.warn('Input "'+d.attr("name")+'" is missing data-validation-max-size attribute',!0),!0;if(!c)return!0;var i=a.formUtils.convertSizeNameToBytes(h),j=!0;return a.each(d.get(0).files||[],function(a,b){return j=b.size<=i}),j||e(this,"wrongFileSize",h,g),j},errorMessage:"",errorMessageKey:"wrongFileSize"}),a.formUtils.convertSizeNameToBytes=function(a){return a=a.toUpperCase(),"M"===a.substr(a.length-1,1)?1024*parseInt(a.substr(0,a.length-1),10)*1024:"MB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10)*1024:"KB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10):"B"===a.substr(a.length-1,1)?parseInt(a.substr(0,a.length-1),10):parseInt(a,10)},a.formUtils.checkImageDimension=function(a,b,c){var d=!1,e={width:0,height:0},f=function(a){a=a.replace("min","").replace("max","");var b=a.split("x");e.width=b[0],e.height=b[1]?b[1]:b[0]},g=!1,h=!1,i=b.split("-");return 1===i.length?0===i[0].indexOf("min")?g=i[0]:h=i[0]:(g=i[0],h=i[1]),g&&(f(g),(a.widthe.width||a.height>e.height)&&(d=a.width>e.width?c.imageTooWide+" "+e.width+"px":c.imageTooTall+" "+e.height+"px",d+=" ("+c.max+" "+e.width+"x"+e.height+"px)")),d},a.formUtils.checkImageRatio=function(a,b,c){var d=a.width/a.height,e=function(a){var b=a.replace("max","").replace("min","").split(":");return b[0]/b[1]},f=b.split("-"),g=function(a,b,c){return a>=b&&a<=c};if(1===f.length){if(d!==e(f[0]))return c.imageRatioNotAccepted}else if(2===f.length&&!g(d,e(f[0]),e(f[1])))return c.imageRatioNotAccepted;return!1},a.formUtils.addAsyncValidator({name:"dimension",validatorFunction:function(b,d,e,g,h){if(c){var i=e.get(0).files||[],j=this;e.attr("data-validation").indexOf("mime")===-1?(alert("You should validate file type being jpg, gif or png on input "+e[0].name),b(!1)):i.length>1?(alert("Validating image dimensions does not support inputs allowing multiple files"),b(!1)):0===i.length?b(!0):f(i[0],function(c){var d=!1;e.valAttr("dimension")&&(d=a.formUtils.checkImageDimension(c,e.valAttr("dimension"),h)),!d&&e.valAttr("ratio")&&(d=a.formUtils.checkImageRatio(c,e.valAttr("ratio"),h)),d?(j.errorMessage=h.wrongFileDim+" "+e.valAttr("has-not-valid-dim"),b(!1)):b(!0)},function(a){throw a})}else b(!0)},errorMessage:"",errorMessageKey:""}),a(b).one("validatorsLoaded formValidationSetup",function(b,c,d){var e;e=c?c.find('input[type="file"]'):a('input[type="file"]'),a.formUtils.dialogs.removeInputStylingAndMessage(e,d)})}(a,window)}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){a.formUtils.registerLoadedModule("file");var c="undefined"!=typeof b.FileReader,d=function(b){var c=(b.valAttr("allowing")||"").toLowerCase().split(/,\s*/);return a.inArray("jpg",c)>-1&&a.inArray("jpeg",c)===-1?c.push("jpeg"):a.inArray("jpeg",c)>-1&&a.inArray("jpg",c)===-1&&c.push("jpg"),c},e=function(a,b,c,d){var e=d[b]||"";a.errorMessageKey="",a.errorMessage=e.replace("%s",c)},f=function(c,d,e){var f=new FileReader,g=new Image;f.readAsDataURL(c),f.onload=function(c){g.onload=function(){a(b).trigger("imageValidation",[this]),d(this)},g.onerror=function(){e()},g.src=c.target.result}};a.formUtils.addValidator({name:"mime",validatorFunction:function(b,f,g,h){if(c){var i=!0,j=f.get(0).files||[],k="",l=d(f);return j.length&&(a.each(j,function(b,c){return i=!1,k=c.type||c.name.substring(c.name.lastIndexOf(".")+1),a.each(l,function(a,b){if(i=k.indexOf(b)>-1)return!1}),i}),i||(a.formUtils.warn("Trying to upload a file with mime type "+k+" which is not allowed"),e(this,"wrongFileType",l.join(", "),h))),i}return a.formUtils.warn("FileReader not supported by browser, will check file extension"),a.formUtils.validators.validate_extension.validatorFunction(b,f,g,h)},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"extension",validatorFunction:function(b,c,f,g){var h=!0,i=this,j=d(c);return a.each(c.get(0).files||[b],function(b,c){var d="string"==typeof c?c:c.value||c.fileName||c.name,f=d.substr(d.lastIndexOf(".")+1);if(a.inArray(f.toLowerCase(),j)===-1)return h=!1,e(i,"wrongFileType",j.join(", "),g),!1}),h},errorMessage:"",errorMessageKey:"wrongFileType"}),a.formUtils.addValidator({name:"size",validatorFunction:function(b,d,f,g){var h=d.valAttr("max-size");if(!h)return a.formUtils.warn('Input "'+d.attr("name")+'" is missing data-validation-max-size attribute',!0),!0;if(!c)return!0;var i=a.formUtils.convertSizeNameToBytes(h),j=!0;return a.each(d.get(0).files||[],function(a,b){return j=b.size<=i}),j||e(this,"wrongFileSize",h,g),j},errorMessage:"",errorMessageKey:"wrongFileSize"}),a.formUtils.convertSizeNameToBytes=function(a){return a=a.toUpperCase(),"M"===a.substr(a.length-1,1)?1024*parseInt(a.substr(0,a.length-1),10)*1024:"MB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10)*1024:"KB"===a.substr(a.length-2,2)?1024*parseInt(a.substr(0,a.length-2),10):"B"===a.substr(a.length-1,1)?parseInt(a.substr(0,a.length-1),10):parseInt(a,10)},a.formUtils.checkImageDimension=function(a,b,c){var d=!1,e={width:0,height:0},f=function(a){a=a.replace("min","").replace("max","");var b=a.split("x");e.width=b[0],e.height=b[1]?b[1]:b[0]},g=!1,h=!1,i=b.split("-");return 1===i.length?0===i[0].indexOf("min")?g=i[0]:h=i[0]:(g=i[0],h=i[1]),g&&(f(g),(a.widthe.width||a.height>e.height)&&(d=a.width>e.width?c.imageTooWide+" "+e.width+"px":c.imageTooTall+" "+e.height+"px",d+=" ("+c.max+" "+e.width+"x"+e.height+"px)")),d},a.formUtils.checkImageRatio=function(a,b,c){var d=a.width/a.height,e=function(a){var b=a.replace("max","").replace("min","").split(":");return b[0]/b[1]},f=b.split("-"),g=function(a,b,c){return a>=b&&a<=c};if(1===f.length){if(d!==e(f[0]))return c.imageRatioNotAccepted}else if(2===f.length&&!g(d,e(f[0]),e(f[1])))return c.imageRatioNotAccepted;return!1},a.formUtils.addAsyncValidator({name:"dimension",validatorFunction:function(b,d,e,g,h){if(c){var i=e.get(0).files||[],j=this;e.attr("data-validation").indexOf("mime")===-1?(alert("You should validate file type being jpg, gif or png on input "+e[0].name),b(!1)):i.length>1?(alert("Validating image dimensions does not support inputs allowing multiple files"),b(!1)):0===i.length?b(!0):f(i[0],function(c){var d=!1;e.valAttr("dimension")&&(d=a.formUtils.checkImageDimension(c,e.valAttr("dimension"),h)),!d&&e.valAttr("ratio")&&(d=a.formUtils.checkImageRatio(c,e.valAttr("ratio"),h)),d?(j.errorMessage=h.wrongFileDim+" "+e.valAttr("has-not-valid-dim"),b(!1)):b(!0)},function(a){throw a})}else b(!0)},errorMessage:"",errorMessageKey:""}),a(b).one("validatorsLoaded formValidationSetup",function(b,c,d){var e;e=c?c.find('input[type="file"]'):a('input[type="file"]'),a.formUtils.dialogs.removeInputStylingAndMessage(e,d)})}(a,window)}); \ No newline at end of file diff --git a/form-validator/html5.js b/form-validator/html5.js index 8679c23..498d3bc 100644 --- a/form-validator/html5.js +++ b/form-validator/html5.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/jquery.form-validator.js b/form-validator/jquery.form-validator.js index dcd33fc..6ee91ee 100644 --- a/form-validator/jquery.form-validator.js +++ b/form-validator/jquery.form-validator.js @@ -17,7 +17,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.78 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT @@ -565,6 +565,10 @@ * * @return {jQuery} */ $.fn.validateOnEvent = function (language, config) { + if(this.length === 0) { + return; + } + var $elements = this[0].nodeName === 'FORM' ? this.find('*[data-validation-event]') : this; $elements .each(function () { @@ -1358,6 +1362,11 @@ */ validators: {}, + /** + * Available sanitizers + */ + sanitizers: {}, + /** * Events triggered by form validator */ @@ -1384,6 +1393,14 @@ this.validators[name] = validator; }, + /** + * Function for adding a sanitizer + * @param {Object} sanitizer + */ + addSanitizer: function (sanitizer) { + this.sanitizers[sanitizer.name] = sanitizer; + }, + /** * Warn user via the console if available */ diff --git a/form-validator/jquery.form-validator.min.js b/form-validator/jquery.form-validator.min.js index d9d1ff3..c950eef 100644 --- a/form-validator/jquery.form-validator.min.js +++ b/form-validator/jquery.form-validator.min.js @@ -1,10 +1,10 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b,c){function d(a,b){this.$form=a,this.$input=b,this.reset(),b.on("change paste",this.reset.bind(this))}var e=function(){return!1},f=null,g={numHalted:0,haltValidation:function(b){this.numHalted++,a.formUtils.haltValidation=!0,b.unbind("submit",e).bind("submit",e).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(b){this.numHalted--,0===this.numHalted&&(a.formUtils.haltValidation=!1,b.unbind("submit",e).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};d.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=c},d.prototype.run=function(a,b){return"keyup"===a?null:this.isRunning?(f=a,this.haltedFormValidation||(g.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(f=a,g.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),b(function(a){this.done(a)}.bind(this)),null)},d.prototype.done=function(a){this.result=a,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(g.unHaltValidation(this.$form),"submit"===f?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},d.loadInstance=function(a,b,c){var e,f=b.get(0);return f.asyncValidators||(f.asyncValidators={}),f.asyncValidators[a]?e=f.asyncValidators[a]:(e=new d(c,b),f.asyncValidators[a]=e),e},a.formUtils=a.extend(a.formUtils||{},{asyncValidation:function(a,b,c){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),d.loadInstance(a,b,c)},addAsyncValidator:function(b){var c=a.extend({},b),e=c.validatorFunction;c.async=!0,c.validatorFunction=function(a,b,f,g,h,i){var j=d.loadInstance(this.name,b,h);return j.run(i,function(d){e.apply(c,[d,a,b,f,g,h,i])})},this.addValidator(c)}}),a(b).bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),c.find("[data-validation]").each(function(){var b=a(this);b.valAttr("async",!1),a.each(a.split(b.attr("data-validation")),function(c,d){var e=a.formUtils.validators["validate_"+d];e&&e.async&&b.valAttr("async","yes")})})})}(a,window),function(a,b){"use strict";function c(b){b&&"custom"===b.errorMessagePosition&&"function"==typeof b.errorMessageCustom&&(a.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),b.submitErrorMessageCallback=function(a,c){b.errorMessageCustom(a,b.language.errorTitle,c,b)})}function d(b){if(b.errorMessagePosition&&"object"==typeof b.errorMessagePosition){a.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var c=b.errorMessagePosition;b.errorMessagePosition="top",b.submitErrorMessageCallback=function(){return c}}}function e(b){var c=b.find("[data-validation-if-checked]");c.length&&a.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),c.on("beforeValidation",function(){var c=a(this),d=c.valAttr("if-checked"),e=a('input[name="'+d+'"]',b),f=e.is(":checked"),g=(a.formUtils.getValue(e)||"").toString(),h=c.valAttr("if-checked-value");(!f||h&&h!==g)&&c.valAttr("skipped",!0)})}function f(b){var c={se:"sv",cz:"cs",dk:"da"};if(b.lang in c){var d=c[b.lang];a.formUtils.warn('Deprecated use of lang code "'+b.lang+'" use "'+d+'" instead'),b.lang=d}}a.fn.validateForm=function(b,c){return a.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(b,c,!0)},a(window).on("formValidationPluginInit",function(a,b){f(b),c(b),d(b)}).on("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),e(c)})}(a),function(a){"use strict";var b={resolveErrorMessage:function(a,b,c,d,e){var f=d.validationErrorMsgAttribute+"-"+c.replace("validate_",""),g=a.attr(f);return g||(g=a.attr(d.validationErrorMsgAttribute),g||(g="function"!=typeof b.errorMessageKey?e[b.errorMessageKey]:e[b.errorMessageKey(d)],g||(g=b.errorMessage))),g},getParentContainer:function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();return"checkbox"===b.attr("type")&&b.closest(".checkbox").length?c=b.closest(".checkbox").parent():"radio"===b.attr("type")&&b.closest(".radio").length&&(c=b.closest(".radio").parent()),c.closest(".input-group").length&&(c=c.closest(".input-group").parent()),c},applyInputErrorStyling:function(a,b){a.addClass(b.errorElementClass).removeClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},applyInputSuccessStyling:function(a,b){a.addClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(a,c){a.removeClass(c.successElementClass).removeClass(c.errorElementClass).css("border-color","");var d=b.getParentContainer(a);if(d.removeClass(c.inputParentClassOnError).removeClass(c.inputParentClassOnSuccess),"function"==typeof c.inlineErrorMessageCallback){var e=c.inlineErrorMessageCallback(a,!1,c);e&&e.html("")}else d.find("."+c.errorMessageClass).remove()},removeAllMessagesAndStyling:function(c,d){if("function"==typeof d.submitErrorMessageCallback){var e=d.submitErrorMessageCallback(c,!1,d);e&&e.html("")}else c.find("."+d.errorMessageClass+".alert").remove();c.find("."+d.errorElementClass+",."+d.successElementClass).each(function(){b.removeInputStylingAndMessage(a(this),d)})},setInlineMessage:function(b,c,d){this.applyInputErrorStyling(b,d);var e,f=document.getElementById(b.attr("name")+"_err_msg"),g=!1,h=function(d){a.formUtils.$win.trigger("validationErrorDisplay",[b,d]),d.html(c)},i=function(){var f=!1;g.find("."+d.errorMessageClass).each(function(){if(this.inputReferer===b[0])return f=a(this),!1}),f?c?h(f):f.remove():""!==c&&(e=a('
'),h(e),e[0].inputReferer=b[0],g.prepend(e))};if(f)a.formUtils.warn("Using deprecated element reference "+f.id),g=a(f),i();else if("function"==typeof d.inlineErrorMessageCallback){if(g=d.inlineErrorMessageCallback(b,c,d),!g)return;i()}else{var j=this.getParentContainer(b);e=j.find("."+d.errorMessageClass+".help-block"),0===e.length&&(e=a("").addClass("help-block").addClass(d.errorMessageClass),e.appendTo(j)),h(e)}},setMessageInTopOfForm:function(b,c,d,e){var f='
{errorTitle}
    {fields}
',g=!1;if("function"!=typeof d.submitErrorMessageCallback||(g=d.submitErrorMessageCallback(b,c,d))){var h={errorTitle:e.errorTitle,fields:"",errorMessageClass:d.errorMessageClass};a.each(c,function(a,b){h.fields+="
  • "+b+"
  • "}),a.each(h,function(a,b){f=f.replace("{"+a+"}",b)}),g?g.html(f):b.children().eq(0).before(a(f))}}};a.formUtils=a.extend(a.formUtils||{},{dialogs:b})}(a),function(a,b,c){"use strict";var d=0;a.fn.validateOnBlur=function(b,c){var d=this,e=this.find("*[data-validation]");return e.each(function(){var e=a(this);if(e.is("[type=radio]")){var f=d.find('[type=radio][name="'+e.attr("name")+'"]');f.bind("blur.validation",function(){e.validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&f.bind("click.validation",function(){e.validateInputOnBlur(b,c,!0,"click")})}}),e.bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){var d="FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this;return d.each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(d){9!==(d||{}).keyCode&&a(this).validateInputOnBlur(b,c,!0,e)})}),this},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find("textarea,input").each(function(){var c=a(this),e="jquery_form_help_"+ ++d,f=c.attr(b);c.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),f&&c.addClass("has-help-txt").bind("focus.help",function(){var b=c.parent().find("."+e);0===b.length&&(b=a("").addClass(e).addClass("help").addClass("help-block").text(f).hide(),c.after(b)),b.fadeIn()}).bind("blur.help",function(){a(this).parent().find("."+e).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0)||{},g=f.validationConfig||a.formUtils.defaultConfig();d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},g,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!b.postponedValidation},a.fn.validateInputOnBlur=function(c,d,e,f){if(a.formUtils.eventType=f,this.willPostponeValidation()){var g=this,h=this.valAttr("postpone")||200;return b.postponedValidation=function(){g.validateInputOnBlur(c,d,e,f),b.postponedValidation=!1},setTimeout(function(){b.postponedValidation&&b.postponedValidation()},h),this}c=a.extend({},a.formUtils.LANG,c||{}),a.formUtils.dialogs.removeInputStylingAndMessage(this,d);var i=this,j=i.closest("form"),k=a.formUtils.validateInput(i,c,d,j,f),l=function(){i.validateInputOnBlur(c,d,!1,"blur.revalidated")};return"blur"===f&&i.unbind("validation.revalidate",l).one("validation.revalidate",l),e&&i.removeKeyUpValidation(),k.shouldChangeDisplay&&(k.isValid?a.formUtils.dialogs.applyInputSuccessStyling(i,d):a.formUtils.dialogs.setInlineMessage(i,k.errorMsg,d)),!k.isValid&&e&&i.validateOnKeyUp(c,d),this},a.fn.validateOnKeyUp=function(b,c){return this.each(function(){var d=a(this);d.valAttr("has-keyup-event")||d.valAttr("has-keyup-event","true").bind("keyup.validation",function(a){9!==a.keyCode&&d.validateInputOnBlur(b,c,!1,"keyup")})}),this},a.fn.removeKeyUpValidation=function(){return this.each(function(){a(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},a.fn.valAttr=function(a,b){return b===c?this.attr("data-validation-"+a):b===!1||null===b?this.removeAttr("data-validation-"+a):(a=a.length>0?"-"+a:"",this.attr("data-validation"+a,b))},a.fn.isValid=function(b,c,d){if(a.formUtils.isLoadingModules){var e=this;return setTimeout(function(){e.isValid(b,c,d)},200),null}c=a.extend({},a.formUtils.defaultConfig(),c||{}),b=a.extend({},a.formUtils.LANG,b||{}),d=d!==!1,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,d=!1);var f=function(b,e){a.inArray(b,h)<0&&h.push(b),i.push(e),e.valAttr("current-error",b),d&&a.formUtils.dialogs.applyInputErrorStyling(e,c)},g=[],h=[],i=[],j=this,k=function(b,d){return"submit"===d||"button"===d||"reset"===d||a.inArray(b,c.ignore||[])>-1};if(d&&a.formUtils.dialogs.removeAllMessagesAndStyling(j,c),j.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var d=a(this),e=d.attr("type"),h="radio"===e||"checkbox"===e,i=d.attr("name");if(!k(i,e)&&(!h||a.inArray(i,g)<0)){h&&g.push(i);var l=a.formUtils.validateInput(d,b,c,j,"submit");l.isValid?l.isValid&&l.shouldChangeDisplay&&(d.valAttr("current-error",!1),a.formUtils.dialogs.applyInputSuccessStyling(d,c)):f(l.errorMsg,d)}}),"function"==typeof c.onValidate){var l=c.onValidate(j);a.isArray(l)?a.each(l,function(a,b){f(b.message,b.element)}):l&&l.element&&l.message&&f(l.message,l.element)}return a.formUtils.isValidatingEntireForm=!1,i.length>0&&d&&("top"===c.errorMessagePosition?a.formUtils.dialogs.setMessageInTopOfForm(j,h,c,b):a.each(i,function(b,d){a.formUtils.dialogs.setInlineMessage(d,d.valAttr("current-error"),c)}),c.scrollToTopOnError&&a.formUtils.$win.scrollTop(j.offset().top-20)),!d&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),0===i.length&&!a.formUtils.haltValidation},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this}}(a,window),function(a){"use strict";a.formUtils=a.extend(a.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(b){this.loadedModules[a.trim(b).toLowerCase()]=!0},hasLoadedModule:function(b){return a.trim(b).toLowerCase()in this.loadedModules},loadModules:function(b,c,d){if(a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(b,c,d)},100);var e=function(b,c){var e=a.split(b),f=e.length,g=function(){f--,0===f&&(a.formUtils.isLoadingModules=!1,"function"==typeof d&&d())};f>0&&(a.formUtils.isLoadingModules=!0);var h="?_="+(new Date).getTime(),i=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(e,function(b,d){if(d=a.trim(d),0===d.length||a.formUtils.hasLoadedModule(d))g();else{var e=c+d+(".js"===d.slice(-3)?"":".js"),f=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([e+(".dev.js"===e.slice(-7)?h:"")],g):(f.type="text/javascript",f.onload=g,f.src=e+(".dev.js"===e.slice(-7)?h:""),f.onerror=function(){a.formUtils.warn("Unable to load form validation module "+e,!0),g()},f.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(g(),this.onload=null,this.onreadystatechange=null)},i.appendChild(f))}})};if(c)e(b,c);else{var f=function(){var c=!1;return a('script[src*="form-validator"]').each(function(){var a=this.src.split("form-validator")[1].split("node_modules").length>1;if(!a)return c=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===c&&(c=""),!1}),c!==!1&&(e(b,c),!0)};f()||a(function(){var a=f();a||"function"==typeof d&&d()})}}})}(a),function(a){"use strict";a.split=function(b,c,d){d=void 0===d||d===!0;var e="[,|"+(d?"\\s":"")+"-]\\s*",f=new RegExp(e,"g");if("function"!=typeof c){if(!b)return[];var g=[];return a.each(b.split(c?c:f),function(b,c){c=a.trim(c),c.length&&g.push(c)}),g}b&&a.each(b.split(f),function(b,d){if(d=a.trim(d),d.length)return c(d,b)})},a.validate=function(b){var c=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(b=a.extend(c,b||{}),a(window).trigger("formValidationPluginInit",[b]),b.lang&&"en"!==b.lang){var d="lang/"+b.lang+".js";b.modules+=b.modules.length?","+d:d}a(b.form).each(function(c,d){d.validationConfig=b;var e=a(d);e.trigger("formValidationSetup",[e,b]),e.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),e.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),e.bind("submit.validation",function(c){var d=a(this),e=function(){return c.stopImmediatePropagation(),!1};if(a.formUtils.haltValidation)return e();if(a.formUtils.isLoadingModules)return setTimeout(function(){d.trigger("submit.validation")},200),e();var f=d.isValid(b.language,b);if(a.formUtils.haltValidation)return e();if(!f||"function"!=typeof b.onSuccess)return f||"function"!=typeof b.onError?!!f||e():(b.onError(d),e());var g=b.onSuccess(d);return g===!1?e():void 0}).bind("reset.validation",function(){a.formUtils.dialogs.removeAllMessagesAndStyling(e,b)}).addClass("has-validation-callback"),b.showHelpOnFocus&&e.showHelpOnFocus(),b.addSuggestions&&e.addSuggestions(),b.validateOnBlur&&(e.validateOnBlur(b.language,b),e.bind("html5ValidationAttrsFound",function(){e.validateOnBlur(b.language,b)})),b.validateOnEvent&&e.validateOnEvent(b.language,b)}),""!==b.modules&&a.formUtils.loadModules(b.modules,null,function(){"function"==typeof b.onModulesLoaded&&b.onModulesLoaded();var c="string"==typeof b.form?a(b.form):b.form;a.formUtils.$win.trigger("validatorsLoaded",[c,b])})}}(a),function(a,b){"use strict";var c=a(b);a.formUtils=a.extend(a.formUtils||{},{$win:c,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},warn:function(a,c){"console"in b?"function"==typeof b.console.warn?b.console.warn(a):"function"==typeof b.console.log&&b.console.log(a):c&&alert(a)},getValue:function(a,b){var c=b?b.find(a):a;if(c.length>0){var d=c.eq(0).attr("type");return"radio"===d||"checkbox"===d?c.filter(":checked").val()||"":c.val()||""}return!1},validateInput:function(b,c,d,e,f){d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG,e.length||(e=b.parent());var g=this.getValue(b);b.valAttr("skipped",!1).one("beforeValidation",function(){(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)&&b.valAttr("skipped",1)}).trigger("beforeValidation",[g,c,d]);var h="true"===b.valAttr("optional"),i=!g&&h,j=b.attr(d.validationRuleAttribute),k=!0,l="",m={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!j||i||b.valAttr("skipped"))return m.shouldChangeDisplay=d.addValidClassOnAll,m;var n=b.valAttr("ignore");return n&&a.each(n.split(""),function(a,b){g=g.replace(new RegExp("\\"+b,"g"),"")}),a.split(j,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i)throw new Error('Using undefined validator "'+h+'". Maybe you have forgotten to load the module that "'+h+'" belongs to?');if("validate_checkbox_group"===h&&(b=e.find('[name="'+b.attr("name")+'"]:eq(0)')),("keyup"!==f||i.validateOnKeyUp)&&(k=i.validatorFunction(g,b,d,c,e,f)),!k)return d.validateOnBlur&&b.validateOnKeyUp(c,d),l=a.formUtils.dialogs.resolveErrorMessage(b,i,h,d,c),!1}),k===!1?(b.trigger("validation",!1),m.errorMsg=l,m.isValid=!1,m.shouldChangeDisplay=!0):null===k?m.shouldChangeDisplay=!1:(b.trigger("validation",!0),m.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==l&&d.onElementValidate(m.isValid,b,e,l),b.trigger("afterValidation",[m,f]),m},parseDate:function(b,c,d){var e,f,g,h,i=c.replace(/[a-zA-Z]/gi,"").substring(0,1),j="^",k=c.split(i||null);if(a.each(k,function(a,b){j+=(a>0?"\\"+i:"")+"(\\d{"+b.length+"})"}),j+="$",d){var l=[];a.each(b.split(i),function(a,b){1===b.length&&(b="0"+b),l.push(b)}),b=l.join(i)}if(e=b.match(new RegExp(j)),null===e)return!1;var m=function(b,c,d){for(var e=0;e28&&(h%4!==0||h%100===0&&h%400!==0)||2===g&&f>29&&(h%4===0||h%100!==0&&h%400===0)||g>12||0===g)&&(!(this.isShortMonth(g)&&f>30||!this.isShortMonth(g)&&f>31||0===f)&&[h,g,f])},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2===0&&a<7||a%2!==0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,e<0&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1===d.length&&c.indexOf("min")===-1&&c.indexOf("max")===-1&&(d=[c,c]),2===d.length&&(bparseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&be?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(b,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,b.attr("autocomplete","off"),0===this._numSuggestionElements&&c.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return b.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var c=a(this),d=[],e=a.trim(c.val()).toLocaleLowerCase();if(e!==a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=c.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!==e){var l=e.length>2;a.each(c.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c===e?(d.push(""+b+""),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"$&")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("
    ").css(f.css).appendTo("body"),b.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,c),k.html(""),a.each(d,function(b,d){a("
    ").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){c.focus(),c.val(a(this).text()),c.trigger("change"),h(c)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13===e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),g.trigger("change"),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38===e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40===e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(nl+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),b},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(a,window),function(a){a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0===d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!==f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!==d.indexOf(".")&&"."!==d.substring(d.length-1,d.length)&&d.indexOf("..")===-1&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1===a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:function(a){return"top"===a.errorMessagePosition||"function"==typeof a.errorMessagePosition?"requiredFields":"requiredField"}}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0===f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"===g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){var c=/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(c.test(b)){var d=b.split("://")[1],e=d.indexOf("/");return e>-1&&(d=d.substr(0,e)),a.formUtils.validators.validate_domain.validatorFunction(d)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1,k=b.attr("data-sanitize")||"",l=k.match(/(^|[\s])numberFormat([\s]|$)/i);if(l){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");a.length&&(a=String(numeral().unformat(a)))}if(f.indexOf("number")===-1&&(f+=",number"),f.indexOf("negative")===-1&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!==i&&(j=!0),","===g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="",j=!1;if(h){i=f+h+g;var k=h.replace(/\\/g,"");k.indexOf(" ")>-1&&(j=!0,k=k.replace(" ",""),k+=e.andSpaces||a.formUtils.LANG.andSpaces),e.badAlphaNumericAndExtraAndSpaces&&e.badAlphaNumericAndExtra?j?this.errorMessage=e.badAlphaNumericAndExtraAndSpaces+k:this.errorMessage=e.badAlphaNumericAndExtra+k+e.badAlphaNumericExtra:this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+k}else i=f+g,this.errorMessage=e.badAlphaNumeric; -return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){var c=new RegExp(b.valAttr("regexp"));return c.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd",f="false"===c.valAttr("require-leading-zero");return a.formUtils.parseDate(b,e,f)!==!1},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a('input[type=checkbox][name^="'+h+'"]',f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0===k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+(e.groupCheckedTooFewEnd||e.groupCheckedEnd),g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+(e.groupCheckedTooManyEnd||e.groupCheckedEnd),g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(a)}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b,c){function d(a,b){this.$form=a,this.$input=b,this.reset(),b.on("change paste",this.reset.bind(this))}var e=function(){return!1},f=null,g={numHalted:0,haltValidation:function(b){this.numHalted++,a.formUtils.haltValidation=!0,b.unbind("submit",e).bind("submit",e).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(b){this.numHalted--,0===this.numHalted&&(a.formUtils.haltValidation=!1,b.unbind("submit",e).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};d.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=c},d.prototype.run=function(a,b){return"keyup"===a?null:this.isRunning?(f=a,this.haltedFormValidation||(g.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(f=a,g.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),b(function(a){this.done(a)}.bind(this)),null)},d.prototype.done=function(a){this.result=a,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(g.unHaltValidation(this.$form),"submit"===f?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},d.loadInstance=function(a,b,c){var e,f=b.get(0);return f.asyncValidators||(f.asyncValidators={}),f.asyncValidators[a]?e=f.asyncValidators[a]:(e=new d(c,b),f.asyncValidators[a]=e),e},a.formUtils=a.extend(a.formUtils||{},{asyncValidation:function(a,b,c){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),d.loadInstance(a,b,c)},addAsyncValidator:function(b){var c=a.extend({},b),e=c.validatorFunction;c.async=!0,c.validatorFunction=function(a,b,f,g,h,i){var j=d.loadInstance(this.name,b,h);return j.run(i,function(d){e.apply(c,[d,a,b,f,g,h,i])})},this.addValidator(c)}}),a(b).bind("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),c.find("[data-validation]").each(function(){var b=a(this);b.valAttr("async",!1),a.each(a.split(b.attr("data-validation")),function(c,d){var e=a.formUtils.validators["validate_"+d];e&&e.async&&b.valAttr("async","yes")})})})}(a,window),function(a,b){"use strict";function c(b){b&&"custom"===b.errorMessagePosition&&"function"==typeof b.errorMessageCustom&&(a.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),b.submitErrorMessageCallback=function(a,c){b.errorMessageCustom(a,b.language.errorTitle,c,b)})}function d(b){if(b.errorMessagePosition&&"object"==typeof b.errorMessagePosition){a.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var c=b.errorMessagePosition;b.errorMessagePosition="top",b.submitErrorMessageCallback=function(){return c}}}function e(b){var c=b.find("[data-validation-if-checked]");c.length&&a.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),c.on("beforeValidation",function(){var c=a(this),d=c.valAttr("if-checked"),e=a('input[name="'+d+'"]',b),f=e.is(":checked"),g=(a.formUtils.getValue(e)||"").toString(),h=c.valAttr("if-checked-value");(!f||h&&h!==g)&&c.valAttr("skipped",!0)})}function f(b){var c={se:"sv",cz:"cs",dk:"da"};if(b.lang in c){var d=c[b.lang];a.formUtils.warn('Deprecated use of lang code "'+b.lang+'" use "'+d+'" instead'),b.lang=d}}a.fn.validateForm=function(b,c){return a.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(b,c,!0)},a(window).on("formValidationPluginInit",function(a,b){f(b),c(b),d(b)}).on("validatorsLoaded formValidationSetup",function(b,c){c||(c=a("form")),e(c)})}(a),function(a){"use strict";var b={resolveErrorMessage:function(a,b,c,d,e){var f=d.validationErrorMsgAttribute+"-"+c.replace("validate_",""),g=a.attr(f);return g||(g=a.attr(d.validationErrorMsgAttribute),g||(g="function"!=typeof b.errorMessageKey?e[b.errorMessageKey]:e[b.errorMessageKey(d)],g||(g=b.errorMessage))),g},getParentContainer:function(b){if(b.valAttr("error-msg-container"))return a(b.valAttr("error-msg-container"));var c=b.parent();return"checkbox"===b.attr("type")&&b.closest(".checkbox").length?c=b.closest(".checkbox").parent():"radio"===b.attr("type")&&b.closest(".radio").length&&(c=b.closest(".radio").parent()),c.closest(".input-group").length&&(c=c.closest(".input-group").parent()),c},applyInputErrorStyling:function(a,b){a.addClass(b.errorElementClass).removeClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnError).removeClass(b.inputParentClassOnSuccess),""!==b.borderColorOnError&&a.css("border-color",b.borderColorOnError)},applyInputSuccessStyling:function(a,b){a.addClass(b.successElementClass),this.getParentContainer(a).addClass(b.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(a,c){a.removeClass(c.successElementClass).removeClass(c.errorElementClass).css("border-color","");var d=b.getParentContainer(a);if(d.removeClass(c.inputParentClassOnError).removeClass(c.inputParentClassOnSuccess),"function"==typeof c.inlineErrorMessageCallback){var e=c.inlineErrorMessageCallback(a,!1,c);e&&e.html("")}else d.find("."+c.errorMessageClass).remove()},removeAllMessagesAndStyling:function(c,d){if("function"==typeof d.submitErrorMessageCallback){var e=d.submitErrorMessageCallback(c,!1,d);e&&e.html("")}else c.find("."+d.errorMessageClass+".alert").remove();c.find("."+d.errorElementClass+",."+d.successElementClass).each(function(){b.removeInputStylingAndMessage(a(this),d)})},setInlineMessage:function(b,c,d){this.applyInputErrorStyling(b,d);var e,f=document.getElementById(b.attr("name")+"_err_msg"),g=!1,h=function(d){a.formUtils.$win.trigger("validationErrorDisplay",[b,d]),d.html(c)},i=function(){var f=!1;g.find("."+d.errorMessageClass).each(function(){if(this.inputReferer===b[0])return f=a(this),!1}),f?c?h(f):f.remove():""!==c&&(e=a('
    '),h(e),e[0].inputReferer=b[0],g.prepend(e))};if(f)a.formUtils.warn("Using deprecated element reference "+f.id),g=a(f),i();else if("function"==typeof d.inlineErrorMessageCallback){if(g=d.inlineErrorMessageCallback(b,c,d),!g)return;i()}else{var j=this.getParentContainer(b);e=j.find("."+d.errorMessageClass+".help-block"),0===e.length&&(e=a("").addClass("help-block").addClass(d.errorMessageClass),e.appendTo(j)),h(e)}},setMessageInTopOfForm:function(b,c,d,e){var f='
    {errorTitle}
      {fields}
    ',g=!1;if("function"!=typeof d.submitErrorMessageCallback||(g=d.submitErrorMessageCallback(b,c,d))){var h={errorTitle:e.errorTitle,fields:"",errorMessageClass:d.errorMessageClass};a.each(c,function(a,b){h.fields+="
  • "+b+"
  • "}),a.each(h,function(a,b){f=f.replace("{"+a+"}",b)}),g?g.html(f):b.children().eq(0).before(a(f))}}};a.formUtils=a.extend(a.formUtils||{},{dialogs:b})}(a),function(a,b,c){"use strict";var d=0;a.fn.validateOnBlur=function(b,c){var d=this,e=this.find("*[data-validation]");return e.each(function(){var e=a(this);if(e.is("[type=radio]")){var f=d.find('[type=radio][name="'+e.attr("name")+'"]');f.bind("blur.validation",function(){e.validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&f.bind("click.validation",function(){e.validateInputOnBlur(b,c,!0,"click")})}}),e.bind("blur.validation",function(){a(this).validateInputOnBlur(b,c,!0,"blur")}),c.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){a(this).validateInputOnBlur(b,c,!0,"click")}),this},a.fn.validateOnEvent=function(b,c){if(0!==this.length){var d="FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this;return d.each(function(){var d=a(this),e=d.valAttr("event");e&&d.unbind(e+".validation").bind(e+".validation",function(d){9!==(d||{}).keyCode&&a(this).validateInputOnBlur(b,c,!0,e)})}),this}},a.fn.showHelpOnFocus=function(b){return b||(b="data-validation-help"),this.find("textarea,input").each(function(){var c=a(this),e="jquery_form_help_"+ ++d,f=c.attr(b);c.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),f&&c.addClass("has-help-txt").bind("focus.help",function(){var b=c.parent().find("."+e);0===b.length&&(b=a("").addClass(e).addClass("help").addClass("help-block").text(f).hide(),c.after(b)),b.fadeIn()}).bind("blur.help",function(){a(this).parent().find("."+e).fadeOut("slow")})}),this},a.fn.validate=function(b,c,d){var e=a.extend({},a.formUtils.LANG,d||{});this.each(function(){var d=a(this),f=d.closest("form").get(0)||{},g=f.validationConfig||a.formUtils.defaultConfig();d.one("validation",function(a,c){"function"==typeof b&&b(c,this,a)}),d.validateInputOnBlur(e,a.extend({},g,c||{}),!0)})},a.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!b.postponedValidation},a.fn.validateInputOnBlur=function(c,d,e,f){if(a.formUtils.eventType=f,this.willPostponeValidation()){var g=this,h=this.valAttr("postpone")||200;return b.postponedValidation=function(){g.validateInputOnBlur(c,d,e,f),b.postponedValidation=!1},setTimeout(function(){b.postponedValidation&&b.postponedValidation()},h),this}c=a.extend({},a.formUtils.LANG,c||{}),a.formUtils.dialogs.removeInputStylingAndMessage(this,d);var i=this,j=i.closest("form"),k=a.formUtils.validateInput(i,c,d,j,f),l=function(){i.validateInputOnBlur(c,d,!1,"blur.revalidated")};return"blur"===f&&i.unbind("validation.revalidate",l).one("validation.revalidate",l),e&&i.removeKeyUpValidation(),k.shouldChangeDisplay&&(k.isValid?a.formUtils.dialogs.applyInputSuccessStyling(i,d):a.formUtils.dialogs.setInlineMessage(i,k.errorMsg,d)),!k.isValid&&e&&i.validateOnKeyUp(c,d),this},a.fn.validateOnKeyUp=function(b,c){return this.each(function(){var d=a(this);d.valAttr("has-keyup-event")||d.valAttr("has-keyup-event","true").bind("keyup.validation",function(a){9!==a.keyCode&&d.validateInputOnBlur(b,c,!1,"keyup")})}),this},a.fn.removeKeyUpValidation=function(){return this.each(function(){a(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},a.fn.valAttr=function(a,b){return b===c?this.attr("data-validation-"+a):b===!1||null===b?this.removeAttr("data-validation-"+a):(a=a.length>0?"-"+a:"",this.attr("data-validation"+a,b))},a.fn.isValid=function(b,c,d){if(a.formUtils.isLoadingModules){var e=this;return setTimeout(function(){e.isValid(b,c,d)},200),null}c=a.extend({},a.formUtils.defaultConfig(),c||{}),b=a.extend({},a.formUtils.LANG,b||{}),d=d!==!1,a.formUtils.errorDisplayPreventedWhenHalted&&(delete a.formUtils.errorDisplayPreventedWhenHalted,d=!1);var f=function(b,e){a.inArray(b,h)<0&&h.push(b),i.push(e),e.valAttr("current-error",b),d&&a.formUtils.dialogs.applyInputErrorStyling(e,c)},g=[],h=[],i=[],j=this,k=function(b,d){return"submit"===d||"button"===d||"reset"===d||a.inArray(b,c.ignore||[])>-1};if(d&&a.formUtils.dialogs.removeAllMessagesAndStyling(j,c),j.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var d=a(this),e=d.attr("type"),h="radio"===e||"checkbox"===e,i=d.attr("name");if(!k(i,e)&&(!h||a.inArray(i,g)<0)){h&&g.push(i);var l=a.formUtils.validateInput(d,b,c,j,"submit");l.isValid?l.isValid&&l.shouldChangeDisplay&&(d.valAttr("current-error",!1),a.formUtils.dialogs.applyInputSuccessStyling(d,c)):f(l.errorMsg,d)}}),"function"==typeof c.onValidate){var l=c.onValidate(j);a.isArray(l)?a.each(l,function(a,b){f(b.message,b.element)}):l&&l.element&&l.message&&f(l.message,l.element)}return a.formUtils.isValidatingEntireForm=!1,i.length>0&&d&&("top"===c.errorMessagePosition?a.formUtils.dialogs.setMessageInTopOfForm(j,h,c,b):a.each(i,function(b,d){a.formUtils.dialogs.setInlineMessage(d,d.valAttr("current-error"),c)}),c.scrollToTopOnError&&a.formUtils.$win.scrollTop(j.offset().top-20)),!d&&a.formUtils.haltValidation&&(a.formUtils.errorDisplayPreventedWhenHalted=!0),0===i.length&&!a.formUtils.haltValidation},a.fn.restrictLength=function(b){return new a.formUtils.lengthRestriction(this,b),this},a.fn.addSuggestions=function(b){var c=!1;return this.find("input").each(function(){var d=a(this);c=a.split(d.attr("data-suggestions")),c.length>0&&!d.hasClass("has-suggestions")&&(a.formUtils.suggest(d,c,b),d.addClass("has-suggestions"))}),this}}(a,window),function(a){"use strict";a.formUtils=a.extend(a.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(b){this.loadedModules[a.trim(b).toLowerCase()]=!0},hasLoadedModule:function(b){return a.trim(b).toLowerCase()in this.loadedModules},loadModules:function(b,c,d){if(a.formUtils.isLoadingModules)return void setTimeout(function(){a.formUtils.loadModules(b,c,d)},100);var e=function(b,c){var e=a.split(b),f=e.length,g=function(){f--,0===f&&(a.formUtils.isLoadingModules=!1,"function"==typeof d&&d())};f>0&&(a.formUtils.isLoadingModules=!0);var h="?_="+(new Date).getTime(),i=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];a.each(e,function(b,d){if(d=a.trim(d),0===d.length||a.formUtils.hasLoadedModule(d))g();else{var e=c+d+(".js"===d.slice(-3)?"":".js"),f=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([e+(".dev.js"===e.slice(-7)?h:"")],g):(f.type="text/javascript",f.onload=g,f.src=e+(".dev.js"===e.slice(-7)?h:""),f.onerror=function(){a.formUtils.warn("Unable to load form validation module "+e,!0),g()},f.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(g(),this.onload=null,this.onreadystatechange=null)},i.appendChild(f))}})};if(c)e(b,c);else{var f=function(){var c=!1;return a('script[src*="form-validator"]').each(function(){var a=this.src.split("form-validator")[1].split("node_modules").length>1;if(!a)return c=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===c&&(c=""),!1}),c!==!1&&(e(b,c),!0)};f()||a(function(){var a=f();a||"function"==typeof d&&d()})}}})}(a),function(a){"use strict";a.split=function(b,c,d){d=void 0===d||d===!0;var e="[,|"+(d?"\\s":"")+"-]\\s*",f=new RegExp(e,"g");if("function"!=typeof c){if(!b)return[];var g=[];return a.each(b.split(c?c:f),function(b,c){c=a.trim(c),c.length&&g.push(c)}),g}b&&a.each(b.split(f),function(b,d){if(d=a.trim(d),d.length)return c(d,b)})},a.validate=function(b){var c=a.extend(a.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(b=a.extend(c,b||{}),a(window).trigger("formValidationPluginInit",[b]),b.lang&&"en"!==b.lang){var d="lang/"+b.lang+".js";b.modules+=b.modules.length?","+d:d}a(b.form).each(function(c,d){d.validationConfig=b;var e=a(d);e.trigger("formValidationSetup",[e,b]),e.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),e.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),e.bind("submit.validation",function(c){var d=a(this),e=function(){return c.stopImmediatePropagation(),!1};if(a.formUtils.haltValidation)return e();if(a.formUtils.isLoadingModules)return setTimeout(function(){d.trigger("submit.validation")},200),e();var f=d.isValid(b.language,b);if(a.formUtils.haltValidation)return e();if(!f||"function"!=typeof b.onSuccess)return f||"function"!=typeof b.onError?!!f||e():(b.onError(d),e());var g=b.onSuccess(d);return g===!1?e():void 0}).bind("reset.validation",function(){a.formUtils.dialogs.removeAllMessagesAndStyling(e,b)}).addClass("has-validation-callback"),b.showHelpOnFocus&&e.showHelpOnFocus(),b.addSuggestions&&e.addSuggestions(),b.validateOnBlur&&(e.validateOnBlur(b.language,b),e.bind("html5ValidationAttrsFound",function(){e.validateOnBlur(b.language,b)})),b.validateOnEvent&&e.validateOnEvent(b.language,b)}),""!==b.modules&&a.formUtils.loadModules(b.modules,null,function(){"function"==typeof b.onModulesLoaded&&b.onModulesLoaded();var c="string"==typeof b.form?a(b.form):b.form;a.formUtils.$win.trigger("validatorsLoaded",[c,b])})}}(a),function(a,b){"use strict";var c=a(b);a.formUtils=a.extend(a.formUtils||{},{$win:c,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(a){var b=0===a.name.indexOf("validate_")?a.name:"validate_"+a.name;void 0===a.validateOnKeyUp&&(a.validateOnKeyUp=!0),this.validators[b]=a},addSanitizer:function(a){this.sanitizers[a.name]=a},warn:function(a,c){"console"in b?"function"==typeof b.console.warn?b.console.warn(a):"function"==typeof b.console.log&&b.console.log(a):c&&alert(a)},getValue:function(a,b){var c=b?b.find(a):a;if(c.length>0){var d=c.eq(0).attr("type");return"radio"===d||"checkbox"===d?c.filter(":checked").val()||"":c.val()||""}return!1},validateInput:function(b,c,d,e,f){d=d||a.formUtils.defaultConfig(),c=c||a.formUtils.LANG,e.length||(e=b.parent());var g=this.getValue(b);b.valAttr("skipped",!1).one("beforeValidation",function(){(b.attr("disabled")||!b.is(":visible")&&!d.validateHiddenInputs)&&b.valAttr("skipped",1)}).trigger("beforeValidation",[g,c,d]);var h="true"===b.valAttr("optional"),i=!g&&h,j=b.attr(d.validationRuleAttribute),k=!0,l="",m={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!j||i||b.valAttr("skipped"))return m.shouldChangeDisplay=d.addValidClassOnAll,m;var n=b.valAttr("ignore");return n&&a.each(n.split(""),function(a,b){g=g.replace(new RegExp("\\"+b,"g"),"")}),a.split(j,function(h){0!==h.indexOf("validate_")&&(h="validate_"+h);var i=a.formUtils.validators[h];if(!i)throw new Error('Using undefined validator "'+h+'". Maybe you have forgotten to load the module that "'+h+'" belongs to?');if("validate_checkbox_group"===h&&(b=e.find('[name="'+b.attr("name")+'"]:eq(0)')),("keyup"!==f||i.validateOnKeyUp)&&(k=i.validatorFunction(g,b,d,c,e,f)),!k)return d.validateOnBlur&&b.validateOnKeyUp(c,d),l=a.formUtils.dialogs.resolveErrorMessage(b,i,h,d,c),!1}),k===!1?(b.trigger("validation",!1),m.errorMsg=l,m.isValid=!1,m.shouldChangeDisplay=!0):null===k?m.shouldChangeDisplay=!1:(b.trigger("validation",!0),m.shouldChangeDisplay=!0),"function"==typeof d.onElementValidate&&null!==l&&d.onElementValidate(m.isValid,b,e,l),b.trigger("afterValidation",[m,f]),m},parseDate:function(b,c,d){var e,f,g,h,i=c.replace(/[a-zA-Z]/gi,"").substring(0,1),j="^",k=c.split(i||null);if(a.each(k,function(a,b){j+=(a>0?"\\"+i:"")+"(\\d{"+b.length+"})"}),j+="$",d){var l=[];a.each(b.split(i),function(a,b){1===b.length&&(b="0"+b),l.push(b)}),b=l.join(i)}if(e=b.match(new RegExp(j)),null===e)return!1;var m=function(b,c,d){for(var e=0;e28&&(h%4!==0||h%100===0&&h%400!==0)||2===g&&f>29&&(h%4===0||h%100!==0&&h%400===0)||g>12||0===g)&&(!(this.isShortMonth(g)&&f>30||!this.isShortMonth(g)&&f>31||0===f)&&[h,g,f])},parseDateInt:function(a){return 0===a.indexOf("0")&&(a=a.replace("0","")),parseInt(a,10)},isShortMonth:function(a){return a%2===0&&a<7||a%2!==0&&a>7},lengthRestriction:function(b,c){var d=parseInt(c.text(),10),e=0,f=function(){var a=b.val().length;if(a>d){var f=b.scrollTop();b.val(b.val().substring(0,d)),b.scrollTop(f)}e=d-a,e<0&&(e=0),c.text(e)};a(b).bind("keydown keyup keypress focus blur",f).bind("cut paste",function(){setTimeout(f,100)}),a(document).bind("ready",f)},numericRangeCheck:function(b,c){var d=a.split(c),e=parseInt(c.substr(3),10);return 1===d.length&&c.indexOf("min")===-1&&c.indexOf("max")===-1&&(d=[c,c]),2===d.length&&(bparseInt(d[1],10))?["out",d[0],d[1]]:0===c.indexOf("min")&&be?["max",e]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(b,d,e){var f={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},g=function(a,b){var c=b.offset();a.css({width:b.outerWidth(),left:c.left+"px",top:c.top+b.outerHeight()+"px"})};e&&a.extend(f,e),f.css.position="absolute",f.css["z-index"]=9999,b.attr("autocomplete","off"),0===this._numSuggestionElements&&c.bind("resize",function(){a(".jquery-form-suggestions").each(function(){var b=a(this),c=b.attr("data-suggest-container");g(b,a(".suggestions-"+c).eq(0))})}),this._numSuggestionElements++;var h=function(b){var c=b.valAttr("suggestion-nr");a.formUtils._selectedSuggestion=null,a.formUtils._previousTypedVal=null,a(".jquery-form-suggestion-"+c).fadeOut("fast")};return b.data("suggestions",d).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){a(this).trigger("keyup"),a.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var c=a(this),d=[],e=a.trim(c.val()).toLocaleLowerCase();if(e!==a.formUtils._previousTypedVal){a.formUtils._previousTypedVal=e;var i=!1,j=c.valAttr("suggestion-nr"),k=a(".jquery-form-suggestion-"+j);if(k.scrollTop(0),""!==e){var l=e.length>2;a.each(c.data("suggestions"),function(a,b){var c=b.toLocaleLowerCase();return c===e?(d.push(""+b+""),i=!0,!1):void((0===c.indexOf(e)||l&&c.indexOf(e)>-1)&&d.push(b.replace(new RegExp(e,"gi"),"$&")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("
    ").css(f.css).appendTo("body"),b.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,c),k.html(""),a.each(d,function(b,d){a("
    ").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(k).click(function(){c.focus(),c.val(a(this).text()),c.trigger("change"),h(c)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(b){var c,d,e=b.keyCode?b.keyCode:b.which,g=a(this);if(13===e&&null!==a.formUtils._selectedSuggestion){if(c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c),d.length>0){var i=d.find("div").eq(a.formUtils._selectedSuggestion).text();g.val(i),g.trigger("change"),h(g),b.preventDefault()}}else{c=g.valAttr("suggestion-nr"),d=a(".jquery-form-suggestion-"+c);var j=d.children();if(j.length>0&&a.inArray(e,[38,40])>-1){38===e?(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=j.length-1:a.formUtils._selectedSuggestion--,a.formUtils._selectedSuggestion<0&&(a.formUtils._selectedSuggestion=j.length-1)):40===e&&(null===a.formUtils._selectedSuggestion?a.formUtils._selectedSuggestion=0:a.formUtils._selectedSuggestion++,a.formUtils._selectedSuggestion>j.length-1&&(a.formUtils._selectedSuggestion=0));var k=d.innerHeight(),l=d.scrollTop(),m=d.children().eq(0).outerHeight(),n=m*a.formUtils._selectedSuggestion;return(nl+k)&&d.scrollTop(n),j.removeClass("active-suggestion").css("background","none").eq(a.formUtils._selectedSuggestion).addClass("active-suggestion").css(f.activeSuggestionCSS),b.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){h(a(this))}),b},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(a,window),function(a){a.formUtils.addValidator({name:"email",validatorFunction:function(b){var c=b.toLowerCase().split("@"),d=c[0],e=c[1];if(d&&e){if(0===d.indexOf('"')){var f=d.length;if(d=d.replace(/\"/g,""),d.length!==f-2)return!1}return a.formUtils.validators.validate_domain.validatorFunction(c[1])&&0!==d.indexOf(".")&&"."!==d.substring(d.length-1,d.length)&&d.indexOf("..")===-1&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(d)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),a.formUtils.addValidator({name:"domain",validatorFunction:function(a){return a.length>0&&a.length<=253&&!/[^a-zA-Z0-9]/.test(a.slice(-2))&&!/[^a-zA-Z0-9]/.test(a.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(a)&&1===a.split("..").length&&a.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),a.formUtils.addValidator({name:"required",validatorFunction:function(b,c,d,e,f){switch(c.attr("type")){case"checkbox":return c.is(":checked");case"radio":return f.find('input[name="'+c.attr("name")+'"]').filter(":checked").length>0;default:return""!==a.trim(b)}},errorMessage:"",errorMessageKey:function(a){return"top"===a.errorMessagePosition||"function"==typeof a.errorMessagePosition?"requiredFields":"requiredField"}}),a.formUtils.addValidator({name:"length",validatorFunction:function(b,c,d,e){var f=c.valAttr("length"),g=c.attr("type");if(void 0===f)return alert('Please add attribute "data-validation-length" to '+c[0].nodeName+" named "+c.attr("name")),!0;var h,i="file"===g&&void 0!==c.get(0).files?c.get(0).files.length:b.length,j=a.formUtils.numericRangeCheck(i,f);switch(j[0]){case"out":this.errorMessage=e.lengthBadStart+f+e.lengthBadEnd,h=!1;break;case"min":this.errorMessage=e.lengthTooShortStart+j[1]+e.lengthBadEnd,h=!1;break;case"max":this.errorMessage=e.lengthTooLongStart+j[1]+e.lengthBadEnd,h=!1;break;default:h=!0}return h},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"url",validatorFunction:function(b){var c=/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i;if(c.test(b)){var d=b.split("://")[1],e=d.indexOf("/");return e>-1&&(d=d.substr(0,e)),a.formUtils.validators.validate_domain.validatorFunction(d)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),a.formUtils.addValidator({name:"number",validatorFunction:function(a,b,c){if(""!==a){var d,e,f=b.valAttr("allowing")||"",g=b.valAttr("decimal-separator")||c.decimalSeparator,h=!1,i=b.valAttr("step")||"",j=!1,k=b.attr("data-sanitize")||"",l=k.match(/(^|[\s])numberFormat([\s]|$)/i);if(l){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");a.length&&(a=String(numeral().unformat(a)))}if(f.indexOf("number")===-1&&(f+=",number"),f.indexOf("negative")===-1&&0===a.indexOf("-"))return!1;if(f.indexOf("range")>-1&&(d=parseFloat(f.substring(f.indexOf("[")+1,f.indexOf(";"))),e=parseFloat(f.substring(f.indexOf(";")+1,f.indexOf("]"))),h=!0),""!==i&&(j=!0),","===g){if(a.indexOf(".")>-1)return!1;a=a.replace(",",".")}if(""===a.replace(/[0-9-]/g,"")&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0;if(f.indexOf("float")>-1&&null!==a.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!h||a>=d&&a<=e)&&(!j||a%i===0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),a.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(b,c,d,e){var f="^([a-zA-Z0-9",g="]+)$",h=c.valAttr("allowing"),i="",j=!1;if(h){i=f+h+g;var k=h.replace(/\\/g,"");k.indexOf(" ")>-1&&(j=!0,k=k.replace(" ",""),k+=e.andSpaces||a.formUtils.LANG.andSpaces),e.badAlphaNumericAndExtraAndSpaces&&e.badAlphaNumericAndExtra?j?this.errorMessage=e.badAlphaNumericAndExtraAndSpaces+k:this.errorMessage=e.badAlphaNumericAndExtra+k+e.badAlphaNumericExtra:this.errorMessage=e.badAlphaNumeric+e.badAlphaNumericExtra+k; +}else i=f+g,this.errorMessage=e.badAlphaNumeric;return new RegExp(i).test(b)},errorMessage:"",errorMessageKey:""}),a.formUtils.addValidator({name:"custom",validatorFunction:function(a,b){var c=new RegExp(b.valAttr("regexp"));return c.test(a)},errorMessage:"",errorMessageKey:"badCustomVal"}),a.formUtils.addValidator({name:"date",validatorFunction:function(b,c,d){var e=c.valAttr("format")||d.dateFormat||"yyyy-mm-dd",f="false"===c.valAttr("require-leading-zero");return a.formUtils.parseDate(b,e,f)!==!1},errorMessage:"",errorMessageKey:"badDate"}),a.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(b,c,d,e,f){var g=!0,h=c.attr("name"),i=a('input[type=checkbox][name^="'+h+'"]',f),j=i.filter(":checked").length,k=c.valAttr("qty");if(void 0===k){var l=c.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+l+" named "+c.attr("name"))}var m=a.formUtils.numericRangeCheck(j,k);switch(m[0]){case"out":this.errorMessage=e.groupCheckedRangeStart+k+e.groupCheckedEnd,g=!1;break;case"min":this.errorMessage=e.groupCheckedTooFewStart+m[1]+(e.groupCheckedTooFewEnd||e.groupCheckedEnd),g=!1;break;case"max":this.errorMessage=e.groupCheckedTooManyStart+m[1]+(e.groupCheckedTooManyEnd||e.groupCheckedEnd),g=!1;break;default:g=!0}if(!g){var n=function(){i.unbind("click",n),i.filter("*[data-validation]").validateInputOnBlur(e,d,!1,"blur")};i.bind("click",n)}return g}})}(a)}); \ No newline at end of file diff --git a/form-validator/jsconf.js b/form-validator/jsconf.js index 64b9548..1499923 100644 --- a/form-validator/jsconf.js +++ b/form-validator/jsconf.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ar.js b/form-validator/lang/ar.js index 0916652..8b80062 100644 --- a/form-validator/lang/ar.js +++ b/form-validator/lang/ar.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ca.js b/form-validator/lang/ca.js index 4c71299..5e92f50 100644 --- a/form-validator/lang/ca.js +++ b/form-validator/lang/ca.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/cs.js b/form-validator/lang/cs.js index 1ba122e..b6247ce 100644 --- a/form-validator/lang/cs.js +++ b/form-validator/lang/cs.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/da.js b/form-validator/lang/da.js index 514b054..f0365b7 100644 --- a/form-validator/lang/da.js +++ b/form-validator/lang/da.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/de.js b/form-validator/lang/de.js index 6b2ba42..1196abf 100644 --- a/form-validator/lang/de.js +++ b/form-validator/lang/de.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/es.js b/form-validator/lang/es.js index 285f4aa..ebfa545 100644 --- a/form-validator/lang/es.js +++ b/form-validator/lang/es.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/fa.js b/form-validator/lang/fa.js index 36a6091..e973dd5 100644 --- a/form-validator/lang/fa.js +++ b/form-validator/lang/fa.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/fr.js b/form-validator/lang/fr.js index 43bf242..1526584 100644 --- a/form-validator/lang/fr.js +++ b/form-validator/lang/fr.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/it.js b/form-validator/lang/it.js index 94bf719..76b83d5 100644 --- a/form-validator/lang/it.js +++ b/form-validator/lang/it.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ka.js b/form-validator/lang/ka.js index 3b5a0f1..0d88991 100644 --- a/form-validator/lang/ka.js +++ b/form-validator/lang/ka.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ko.js b/form-validator/lang/ko.js index a791f84..7e2c0ea 100644 --- a/form-validator/lang/ko.js +++ b/form-validator/lang/ko.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/nl.js b/form-validator/lang/nl.js index 6f35bdb..ae0f5f9 100644 --- a/form-validator/lang/nl.js +++ b/form-validator/lang/nl.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/no.js b/form-validator/lang/no.js index 01ef7f9..7b4b1eb 100644 --- a/form-validator/lang/no.js +++ b/form-validator/lang/no.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/pl.js b/form-validator/lang/pl.js index b3005cf..f0af0e1 100644 --- a/form-validator/lang/pl.js +++ b/form-validator/lang/pl.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/pt.js b/form-validator/lang/pt.js index 22b6994..089ab14 100644 --- a/form-validator/lang/pt.js +++ b/form-validator/lang/pt.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ro.js b/form-validator/lang/ro.js index 562d90e..b413e2e 100644 --- a/form-validator/lang/ro.js +++ b/form-validator/lang/ro.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/ru.js b/form-validator/lang/ru.js index 3bdd43e..63f018c 100644 --- a/form-validator/lang/ru.js +++ b/form-validator/lang/ru.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/sv.js b/form-validator/lang/sv.js index a561f31..7f574af 100644 --- a/form-validator/lang/sv.js +++ b/form-validator/lang/sv.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/tr.js b/form-validator/lang/tr.js index 7ffef8e..4fc53d3 100644 --- a/form-validator/lang/tr.js +++ b/form-validator/lang/tr.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/vi.js b/form-validator/lang/vi.js index 22993c6..02f19f0 100644 --- a/form-validator/lang/vi.js +++ b/form-validator/lang/vi.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/lang/zh.js b/form-validator/lang/zh.js new file mode 100644 index 0000000..18e70db --- /dev/null +++ b/form-validator/lang/zh.js @@ -0,0 +1,9 @@ +/** File generated by Grunt -- do not modify + * JQUERY-FORM-VALIDATOR + * + * @version 2.3.79 + * @website http://formvalidator.net/ + * @author Victor Jonsson, http://victorjonsson.se + * @license MIT + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("lang/zh"),a(b).bind("validatorsLoaded",function(){a.formUtils.LANG={errorTitle:"表单提交失败!",requiredField:"这是个必填字段",requiredFields:"您没有回答完所有的问题",badTime:"您填写了一个错误的时间",badEmail:"您填写的邮箱地址格式错误",badTelephone:"您填写的手机号格式错误",badSecurityAnswer:"您填写的答案错误",badDate:"您填写的日期错误",lengthBadStart:"填写的值必须在 ",lengthBadEnd:" 字符",lengthTooLongStart:"填写的值要大于 ",lengthTooShortStart:"填写的值要小于 ",notConfirmed:"输入的内容不一致",badDomain:"错误的域名",badUrl:"不是一个正确的URL",badCustomVal:"输入的值不正确",andSpaces:" 和字符 ",badInt:"输入的值不是一个正确的整数",badSecurityNumber:"您的信用卡卡号不正确",badUKVatAnswer:"错误的 UK VAT 号码",badUKNin:"错误的 UK NIN",badUKUtr:"错误的 UK UTR 号码",badStrength:"密码太弱",badNumberOfSelectedOptionsStart:"您至少要选择 ",badNumberOfSelectedOptionsEnd:" 选项",badAlphaNumeric:"填写的值只能是字母数字的组合 ",badAlphaNumericExtra:" 和 ",wrongFileSize:"您要上传的文件太大(最大 %s)",wrongFileType:"文件类型是 %s 才被允许上传",groupCheckedRangeStart:"请选择范围在 ",groupCheckedTooFewStart:"请至少选择 ",groupCheckedTooManyStart:"请最多选择 ",groupCheckedEnd:" 项目(s)",badCreditCard:"信用卡号码不正确",badCVV:"CVV 号码不正确",wrongFileDim:"图像尺寸错误,",imageTooTall:"图像不能高于",imageTooWide:"图像不能宽于",imageTooSmall:"图像太小",min:"最小",max:"最大",imageRatioNotAccepted:"图片的比列不允许",badBrazilTelephoneAnswer:"手机号格式错误",badBrazilCEPAnswer:"CEP 输入无效",badBrazilCPFAnswer:"CPF 输入无效",badPlPesel:"PESEL 输入无效",badPlNip:"NIP 输入无效",badPlRegon:"REGON 输入无效",badreCaptcha:"请确认你不是机器人",passwordComplexityStart:"密码必须至少要包含 ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" 大写字母(s)",passwordComplexityLowercaseInfo:" 小写字母(s)",passwordComplexitySpecialCharsInfo:" 特殊字符(s)",passwordComplexityNumericCharsInfo:" 数字字符(s)",passwordComplexityEnd:"."}})}(a,window)}); \ No newline at end of file diff --git a/form-validator/location.js b/form-validator/location.js index 1c3f5e1..0598731 100644 --- a/form-validator/location.js +++ b/form-validator/location.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/logic.js b/form-validator/logic.js index 427fd45..3656f0c 100644 --- a/form-validator/logic.js +++ b/form-validator/logic.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/poland.js b/form-validator/poland.js index 2c3dedd..e66f470 100644 --- a/form-validator/poland.js +++ b/form-validator/poland.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/sanitize.js b/form-validator/sanitize.js index be40224..3bfc959 100644 --- a/form-validator/sanitize.js +++ b/form-validator/sanitize.js @@ -1,9 +1,9 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.registerLoadedModule("sanitize");var c='[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]',d={upper:function(a){return a.toLocaleUpperCase()},lower:function(a){return a.toLocaleLowerCase()},trim:function(b){return a.trim(b)},trimLeft:function(a){return a.replace(/^\s+/,"")},trimRight:function(a){return a.replace(/\s+$/,"")},capitalize:function(b){var c=b.split(" ");return a.each(c,function(a,b){c[a]=b.substr(0,1).toUpperCase()+b.substr(1,b.length)}),c.join(" ")},insert:function(a,b,c){var d=(b.attr("data-sanitize-insert-"+c)||"").replace(/\[SPACE\]/g," ");return"left"===c&&0===a.indexOf(d)||"right"===c&&a.substring(a.length-d.length)===d?a:("left"===c?d:"")+a+("right"===c?d:"")},insertRight:function(a,b){return this.insert(a,b,"right")},insertLeft:function(a,b){return this.insert(a,b,"left")},numberFormat:function(a,c){if(0===a.length)return a;if(!("numeral"in b))throw new ReferenceError('Using sanitation function "numberFormat" requires that you include numeral.js (http://numeraljs.com/)');return a=numeral().unformat(a),a=numeral(a).format(c.attr("data-sanitize-number-format"))},strip:function(b,c){var d=c.attr("data-sanitize-strip")||"";return a.split(d,function(c){var d=new RegExp(a.isNumeric(c)?c:"\\"+c,"g");b=b.replace(d,"")}),b},escape:function(b,c){var d=c.valAttr("is-escaped"),e={"<":"__%AMP%__lt;",">":"__%AMP%__gt;","&":"__%AMP%__amp;","'":"__%AMP%__#8217;",'"':"__%AMP%__quot;"};return"yes"===d?b:(c.valAttr("is-escaped","yes"),c.one("keyup",function(a){9!==a.keyCode&&c.valAttr("is-escaped","no")}),a.each(e,function(a,c){b=b.replace(new RegExp(a,"g"),c)}),b.replace(new RegExp("__%AMP%__","g"),"&"))}},e=function(b,e,f){e||(e=a("form")),e.each||(e=a(e));var g=function(){var b=a(this),c=b.val();a.split(b.attr("data-sanitize"),function(a){if(!(a in d))throw new Error('Use of unknown sanitize command "'+a+'"');c=d[a](c,b,f)}),b.val(c).trigger("keyup.validation")};e.each(function(){var b=a(this);f.sanitizeAll&&b.find("input,textarea").not(c).each(function(){var b=a(this),c=b.attr("data-sanitize")||"";b.attr("data-sanitize",f.sanitizeAll+" "+c)}),b.find("[data-sanitize]").unbind("blur.sanitation",g).bind("blur.sanitation",g),a(function(){b.trigger("blur.sanitation")})})};a(b).on("validatorsLoaded formValidationSetup",e),a.formUtils.setupSanitation=e}(a,window)}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a,b){"use strict";a.formUtils.addSanitizer({name:"upper",sanitizerFunction:function(a){return a.toLocaleUpperCase()}}),a.formUtils.addSanitizer({name:"lower",sanitizerFunction:function(a){return a.toLocaleLowerCase()}}),a.formUtils.addSanitizer({name:"trim",sanitizerFunction:function(b){return a.trim(b)}}),a.formUtils.addSanitizer({name:"trimLeft",sanitizerFunction:function(a){return a.replace(/^\s+/,"")}}),a.formUtils.addSanitizer({name:"trimRight",sanitizerFunction:function(a){return a.replace(/\s+$/,"")}}),a.formUtils.addSanitizer({name:"capitalize",sanitizerFunction:function(b){var c=b.split(" ");return a.each(c,function(a,b){c[a]=b.substr(0,1).toUpperCase()+b.substr(1,b.length)}),c.join(" ")}}),a.formUtils.addSanitizer({name:"insert",sanitizerFunction:function(a,b,c){var d=(b.attr("data-sanitize-insert-"+c)||"").replace(/\[SPACE\]/g," ");return"left"===c&&0===a.indexOf(d)||"right"===c&&a.substring(a.length-d.length)===d?a:("left"===c?d:"")+a+("right"===c?d:"")}}),a.formUtils.addSanitizer({name:"insertRight",sanitizerFunction:function(b,c){return a.formUtils.sanitizers.insert.sanitizerFunction(b,c,"right")}}),a.formUtils.addSanitizer({name:"insertLeft",sanitizerFunction:function(b,c){return a.formUtils.sanitizers.insert.sanitizerFunction(b,c,"left")}}),a.formUtils.addSanitizer({name:"numberFormat",sanitizerFunction:function(a,c){if(0===a.length)return a;if(!("numeral"in b))throw new ReferenceError('Using sanitation function "numberFormat" requires that you include numeral.js (http://numeraljs.com/)');return a=numeral().unformat(a),a=numeral(a).format(c.attr("data-sanitize-number-format"))}}),a.formUtils.addSanitizer({name:"strip",sanitizerFunction:function(b,c){var d=c.attr("data-sanitize-strip")||"";return a.split(d,function(c){var d=new RegExp(a.isNumeric(c)?c:"\\"+c,"g");b=b.replace(d,"")}),b}}),a.formUtils.addSanitizer({name:"escape",sanitizerFunction:function(b,c){var d=c.valAttr("is-escaped"),e={"<":"__%AMP%__lt;",">":"__%AMP%__gt;","&":"__%AMP%__amp;","'":"__%AMP%__#8217;",'"':"__%AMP%__quot;"};return"yes"===d?b:(c.valAttr("is-escaped","yes"),c.one("keyup",function(a){9!==a.keyCode&&c.valAttr("is-escaped","no")}),a.each(e,function(a,c){b=b.replace(new RegExp(a,"g"),c)}),b.replace(new RegExp("__%AMP%__","g"),"&"))}}),a.formUtils.registerLoadedModule("sanitize");var c='[type="button"], [type="submit"], [type="radio"], [type="checkbox"], [type="reset"], [type="search"]',d=function(b,d,e){d||(d=a("form")),d.each||(d=a(d));var f=function(){var b=a(this),c=b.val();a.split(b.attr("data-sanitize"),function(d){var f=a.formUtils.sanitizers[d];if(!f)throw new Error('Use of unknown sanitize command "'+d+'"');c=f.sanitizerFunction(c,b,e)}),b.val(c).trigger("keyup.validation")};d.each(function(){var b=a(this);e.sanitizeAll&&b.find("input,textarea").not(c).each(function(){var b=a(this),c=b.attr("data-sanitize")||"";b.attr("data-sanitize",e.sanitizeAll+" "+c)}),b.find("[data-sanitize]").unbind("blur.sanitation",f).bind("blur.sanitation",f),a(function(){b.trigger("blur.sanitation")})})};a(b).on("validatorsLoaded formValidationSetup",d),a.formUtils.setupSanitation=d}(a,window)}); \ No newline at end of file diff --git a/form-validator/security.js b/form-validator/security.js index e56f88d..c1fd315 100644 --- a/form-validator/security.js +++ b/form-validator/security.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/sepa.js b/form-validator/sepa.js index 97b569c..5b60f92 100644 --- a/form-validator/sepa.js +++ b/form-validator/sepa.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/sweden.js b/form-validator/sweden.js index a27ff4d..d4a367b 100644 --- a/form-validator/sweden.js +++ b/form-validator/sweden.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/toggleDisabled.js b/form-validator/toggleDisabled.js index b496653..38bd9aa 100644 --- a/form-validator/toggleDisabled.js +++ b/form-validator/toggleDisabled.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/form-validator/uk.js b/form-validator/uk.js index 7188bcc..ad5cd17 100644 --- a/form-validator/uk.js +++ b/form-validator/uk.js @@ -1,7 +1,7 @@ /** File generated by Grunt -- do not modify * JQUERY-FORM-VALIDATOR * - * @version 2.3.77 + * @version 2.3.79 * @website http://formvalidator.net/ * @author Victor Jonsson, http://victorjonsson.se * @license MIT diff --git a/formvalidator.jquery.json b/formvalidator.jquery.json index 1fa9abf..3507aa1 100644 --- a/formvalidator.jquery.json +++ b/formvalidator.jquery.json @@ -7,7 +7,7 @@ "validation", "validator" ], - "version": "2.3.77", + "version": "2.3.79", "author": { "name": "Victor Jonsson", "url": "http://victorjonsson.se", diff --git a/package.json b/package.json index 58714af..021fe89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jquery-form-validator", "description": "With this feature rich jQuery plugin it becomes easy to validate user input while keeping your HTML markup clean from javascript code. Even though this plugin has a wide range of validation functions it's designed to require as little bandwidth as possible. This is achieved by grouping together validation functions in \"modules\", making it possible for the programmer to load only those functions that's needed to validate a particular form.", - "version": "2.3.77", + "version": "2.3.79", "main": "./form-validator/jquery.form-validator.min.js", "keywords": [ "form",