1/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Tento soubor neupravujte !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2/*ZmÄny jsou potÅeba udÄlat ve zdrojových souborech v contrib/bootstrapvalidator a pak vygenerovat pÅes ./node_modules/grunt/bin/grunt 3/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Tento soubor neupravujte !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5 * BootstrapValidator (http://bootstrapvalidator.com) 6 * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 7 * 8 * @version v0.5.3, built on 2026-08-28 10:59:23 AM 9 * @author https://twitter.com/nghuuphuoc 10 * @copyright (c) 2013 - 2026 Nguyen Huu Phuoc 11 * @license Commercial: http://bootstrapvalidator.com/license/ 12 * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ 13 */ 14if(typeof jQuery==='undefined'){throw new Error('BootstrapValidator requires jQuery');} 15(function($){var version=$.fn.jquery.split(' ')[0].split('.');if((+version[0]<2&&+version[1]<9)||(+version[0]===1&&+version[1]===9&&+version[2]<1)){throw new Error('BootstrapValidator requires jQuery version 1.9.1 or higher');}}(window.jQuery));(function($){var BootstrapValidator=function(form,options){this.$form=$(form);this.options=$.extend({},$.fn.bootstrapValidator.DEFAULT_OPTIONS,options);this.$invalidFields=$([]);this.$submitButton=null;this.$hiddenButton=null;this.STATUS_NOT_VALIDATED='NOT_VALIDATED';this.STATUS_VALIDATING='VALIDATING';this.STATUS_INVALID='INVALID';this.STATUS_VALID='VALID';var ieVersion=(function(){var v=3,div=document.createElement('div'),a=div.all||[];while(div.innerHTML='<!--[if gt IE '+(++v)+']><br><![endif]-->',a[0]){} 16return v>4?v:!v;}());var el=document.createElement('div');this._changeEvent=(ieVersion===9||!('oninput'in el))?'keyup':'input';this._submitIfValid=null;this._cacheFields={};this._init();};BootstrapValidator.prototype={constructor:BootstrapValidator,_init:function(){var that=this,options={autoFocus:this.$form.attr('data-bv-autofocus'),container:this.$form.attr('data-bv-container'),events:{formInit:this.$form.attr('data-bv-events-form-init'),formError:this.$form.attr('data-bv-events-form-error'),formSuccess:this.$form.attr('data-bv-events-form-success'),fieldAdded:this.$form.attr('data-bv-events-field-added'),fieldRemoved:this.$form.attr('data-bv-events-field-removed'),fieldInit:this.$form.attr('data-bv-events-field-init'),fieldError:this.$form.attr('data-bv-events-field-error'),fieldSuccess:this.$form.attr('data-bv-events-field-success'),fieldStatus:this.$form.attr('data-bv-events-field-status'),validatorError:this.$form.attr('data-bv-events-validator-error'),validatorSuccess:this.$form.attr('data-bv-events-validator-success')},excluded:this.$form.attr('data-bv-excluded'),feedbackIcons:{valid:this.$form.attr('data-bv-feedbackicons-valid'),invalid:this.$form.attr('data-bv-feedbackicons-invalid'),validating:this.$form.attr('data-bv-feedbackicons-validating')},group:this.$form.attr('data-bv-group'),live:this.$form.attr('data-bv-live'),message:this.$form.attr('data-bv-message'),onError:this.$form.attr('data-bv-onerror'),onSuccess:this.$form.attr('data-bv-onsuccess'),submitButtons:this.$form.attr('data-bv-submitbuttons'),threshold:this.$form.attr('data-bv-threshold'),trigger:this.$form.attr('data-bv-trigger'),verbose:this.$form.attr('data-bv-verbose'),fields:{}};this.$form.attr('novalidate','novalidate').addClass(this.options.elementClass).on('submit.bv',function(e){e.preventDefault();that.validate();}).on('click.bv',this.options.submitButtons,function(){that.$submitButton=$(this);that._submitIfValid=true;}).find('[name], [data-bv-field]').each(function(){var $field=$(this),field=$field.attr('name')||$field.attr('data-bv-field'),opts=that._parseOptions($field);if(opts){$field.attr('data-bv-field',field);options.fields[field]=$.extend({},opts,options.fields[field]);}});this.options=$.extend(true,this.options,options);this.$hiddenButton=$('<button/>').attr('type','submit').attr('name',this.$form.find('[type=submit]').attr('name')).attr('value',this.$form.find('[type=submit]').attr('value')).prependTo(this.$form).addClass('bv-hidden-submit').css({display:'none',width:0,height:0});this.$form.on('click.bv','[type="submit"]',function(e){if(!e.isDefaultPrevented()){var $target=$(e.target),$button=$target.is('[type="submit"]')?$target.eq(0):$target.parent('[type="submit"]').eq(0);if(that.options.submitButtons&&!$button.is(that.options.submitButtons)&&!$button.is(that.$hiddenButton)){that.$form.off('submit.bv').submit();}}});for(var field in this.options.fields){this._initField(field);} 17this.$form.trigger($.Event(this.options.events.formInit),{bv:this,options:this.options});if(this.options.onSuccess){this.$form.on(this.options.events.formSuccess,function(e){$.fn.bootstrapValidator.helpers.call(that.options.onSuccess,[e]);});} 18if(this.options.onError){this.$form.on(this.options.events.formError,function(e){$.fn.bootstrapValidator.helpers.call(that.options.onError,[e]);});}},_parseOptions:function($field){var field=$field.attr('name')||$field.attr('data-bv-field'),validators={},validator,v,attrName,enabled,optionName,optionAttrName,optionValue,html5AttrName,html5AttrMap;
18for(v in $.fn.bootstrapValidator.validators){validator=$.fn.bootstrapValidator.validators[v];attrName='data-bv-'+v.toLowerCase(),enabled=$field.attr(attrName)+'';html5AttrMap=('function'===typeof validator.enableByHtml5)?validator.enableByHtml5($field):null;if((html5AttrMap&&enabled!=='false')||(html5AttrMap!==true&&(''===enabled||'true'===enabled||attrName===enabled.toLowerCase()))){validator.html5Attributes=$.extend({},{message:'message',onerror:'onError',onsuccess:'onSuccess'},validator.html5Attributes);validators[v]=$.extend({},html5AttrMap===true?{}:html5AttrMap,validators[v]);for(html5AttrName in validator.html5Attributes){optionName=validator.html5Attributes[html5AttrName];optionAttrName='data-bv-'+v.toLowerCase()+'-'+html5AttrName,optionValue=$field.attr(optionAttrName);if(optionValue){if('true'===optionValue||optionAttrName===optionValue.toLowerCase()){optionValue=true;}else if('false'===optionValue){optionValue=false;} 19validators[v][optionName]=optionValue;}}}} 20var opts={autoFocus:$field.attr('data-bv-autofocus'),container:$field.attr('data-bv-container'),excluded:$field.attr('data-bv-excluded'),feedbackIcons:$field.attr('data-bv-feedbackicons'),group:$field.attr('data-bv-group'),message:$field.attr('data-bv-message'),onError:$field.attr('data-bv-onerror'),onStatus:$field.attr('data-bv-onstatus'),onSuccess:$field.attr('data-bv-onsuccess'),selector:$field.attr('data-bv-selector'),threshold:$field.attr('data-bv-threshold'),trigger:$field.attr('data-bv-trigger'),verbose:$field.attr('data-bv-verbose'),validators:validators},emptyOptions=$.isEmptyObject(opts),emptyValidators=$.isEmptyObject(validators);if(!emptyValidators||(!emptyOptions&&this.options.fields&&this.options.fields[field])){opts.validators=validators;return opts;}else{return null;}},_initField:function(field){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field');break;case'string':fields=this.getFieldElements(field);fields.attr('data-bv-field',field);break;default:break;} 21if(fields.length===0){return;} 22if(this.options.fields[field]===null||this.options.fields[field].validators===null){return;} 23var validatorName;
23for(validatorName in this.options.fields[field].validators){if(!$.fn.bootstrapValidator.validators[validatorName]){delete this.options.fields[field].validators[validatorName];}} 24if(this.options.fields[field].enabled===null){this.options.fields[field].enabled=true;} 25var that=this,total=fields.length,type=fields.attr('type'),updateAll=(total===1)||('radio'===type)||('checkbox'===type),event=('radio'===type||'checkbox'===type||'file'===type||'SELECT'===fields.eq(0).get(0).tagName)?'change':this._changeEvent,trigger=(this.options.fields[field].trigger||this.options.trigger||event).split(' '),events=$.map(trigger,function(item){return item+'.update.bv';}).join(' ');for(var i=0;i<total;i++){var $field=fields.eq(i),group=this.options.fields[field].group||this.options.group,$parent=$field.parents(group),container=('function'===typeof(this.options.fields[field].container||this.options.container))?(this.options.fields[field].container||this.options.container).call(this,$field,this):(this.options.fields[field].container||this.options.container),$message=(container&&container!=='tooltip'&&container!=='popover')?$(container):this._getMessageContainer($field,group);if(container&&container!=='tooltip'&&container!=='popover'){$message.addClass('has-error');} 26$message.find('.help-block[data-bv-validator][data-bv-for="'+field+'"]').remove();$parent.find('i[data-bv-icon-for="'+field+'"]').remove();$field.off(events).on(events,function(){that.updateStatus($(this),that.STATUS_NOT_VALIDATED);});$field.data('bv.messages',$message);for(validatorName in this.options.fields[field].validators){$field.data('bv.result.'+validatorName,this.STATUS_NOT_VALIDATED);if(!updateAll||i===total-1){$('<small/>').css('display','none').addClass('help-block').attr('data-bv-validator',validatorName).attr('data-bv-for',field).attr('data-bv-result',this.STATUS_NOT_VALIDATED).html(this._getMessage(field,validatorName)).appendTo($message);} 27if('function'===typeof $.fn.bootstrapValidator.validators[validatorName].init){$.fn.bootstrapValidator.validators[validatorName].init(this,$field,this.options.fields[field].validators[validatorName]);}} 28if(this.options.fields[field].feedbackIcons!==false&&this.options.fields[field].feedbackIcons!=='false'&&this.options.feedbackIcons&&this.options.feedbackIcons.validating&&this.options.feedbackIcons.invalid&&this.options.feedbackIcons.valid&&(!updateAll||i===total-1)){$parent.addClass('has-feedback');var $icon=$('<i/>').css('display','none').addClass('form-control-feedback').attr('data-bv-icon-for',field).insertAfter($field);if('checkbox'===type||'radio'===type){var $fieldParent=$field.parent();if($fieldParent.hasClass(type)){$icon.insertAfter($fieldParent);}else if($fieldParent.parent().hasClass(type)){$icon.insertAfter($fieldParent.parent());}} 29if($parent.find('label').length===0){$icon.addClass('bv-no-label');} 30if($parent.find('.input-group').length!==0){$icon.addClass('bv-icon-input-group').insertAfter($parent.find('.input-group').eq(0));} 31if(!updateAll){$field.data('bv.icon',$icon);}else if(i===total-1){fields.data('bv.icon',$icon);} 32if(container){$field.off('focus.container.bv').on('focus.container.bv',function(){switch(container){case'tooltip':$(this).data('bv.icon').tooltip('show');break;case'popover':$(this).data('bv.icon').popover('show');break;default:break;}}).off('blur.container.bv').on('blur.container.bv',function(){switch(container){case'tooltip':$(this).data('bv.icon').tooltip('hide');break;case'popover':$(this).data('bv.icon').popover('hide');break;default:break;}});}}} 33fields.on(this.options.events.fieldSuccess,function(e,data){var onSuccess=that.getOptions(data.field,null,'onSuccess');if(onSuccess){$.fn.bootstrapValidator.helpers.call(onSuccess,[e,data]);}}).on(this.options.events.fieldError,function(e,data){var onError=that.getOptions(data.field,null,'onError');if(onError){$.fn.bootstrapValidator.helpers.call(onError,[e,data]);}}).on(this.options.events.fieldStatus,function(e,data){var onStatus=that.getOptions(data.field,null,'onStatus');if(onStatus){$.fn.bootstrapValidator.helpers.call(onStatus,[e,data]);}}).on(this.options.events.validatorError,function(e,data){var onError=that.getOptions(data.field,data.validator,'onError');if(onError){$.fn.bootstrapValidator.helpers.call(onError,[e,data]);}}).on(this.options.events.validatorSuccess,function(e,data){var onSuccess=that.getOptions(data.field,data.validator,'onSuccess');if(onSuccess){$.fn.bootstrapValidator.helpers.call(onSuccess,[e,data]);}});events=$.map(trigger,function(item){return item+'.live.bv';}).join(' ');switch(this.options.live){case'submitted':break;case'disabled':fields.off(events);break;case'enabled':default:fields.off(events).on(events,function(){if(that._exceedThreshold($(this))){that.validateField($(this));}});break;} 34fields.trigger($.Event(this.options.events.fieldInit),{bv:this,field:field,element:fields});},_getMessage:function(field,validatorName){if(!this.options.fields[field]||!$.fn.bootstrapValidator.validators[validatorName]||!this.options.fields[field].validators||!this.options.fields[field].validators[validatorName]){return'';} 35var options=this.options.fields[field].validators[validatorName];switch(true){case(!!options.message):return options.message;case(!!this.options.fields[field].message):return this.options.fields[field].message;case(!!$.fn.bootstrapValidator.i18n[validatorName]):return $.fn.bootstrapValidator.i18n[validatorName]['default'];default:return this.options.message;}},_getMessageContainer:function($field,group){var $originalField;var $parent=$field.parent();if(!$originalField){$originalField=$field;} 36if($parent.length===0){return $originalField.parent();} 37if($parent.is(group)){return $parent;}
38var cssClasses=$parent.attr('class');if(!cssClasses){return this._getMessageContainer($parent,group);} 39cssClasses=cssClasses.split(' ');var n=cssClasses.length;for(var i=0;i<n;i++){if(/^col-(xs|sm|md|lg)-\d+$/.test(cssClasses[i])||/^col-(xs|sm|md|lg)-offset-\d+$/.test(cssClasses[i])){return $parent;}} 40return this._getMessageContainer($parent,group);},_submit:function(){var isValid=this.isValid(),eventType=isValid?this.options.events.formSuccess:this.options.events.formError,e=$.Event(eventType);this.$form.trigger(e);if(this.$submitButton){isValid?this._onSuccess(e):this._onError(e);}},_isExcluded:function($field){var excludedAttr=$field.attr('data-bv-excluded'),field=$field.attr('data-bv-field')||$field.attr('name');switch(true){case(!!field&&this.options.fields&&this.options.fields[field]&&(this.options.fields[field].excluded==='true'||this.options.fields[field].excluded===true)):case(excludedAttr==='true'):case(excludedAttr===''):return true;case(!!field&&this.options.fields&&this.options.fields[field]&&(this.options.fields[field].excluded==='false'||this.options.fields[field].excluded===false)):case(excludedAttr==='false'):return false;default:if(this.options.excluded){if('string'===typeof this.options.excluded){this.options.excluded=$.map(this.options.excluded.split(','),function(item){return $.trim(item);});} 41var length=this.options.excluded.length;for(var i=0;i<length;i++){if(('string'===typeof this.options.excluded[i]&&$field.is(this.options.excluded[i]))||('function'===typeof this.options.excluded[i]&&this.options.excluded[i].call(this,$field,this)===true)){return true;}}} 42return false;}},_exceedThreshold:function($field){var field=$field.attr('data-bv-field'),threshold=this.options.fields[field].threshold||this.options.threshold;if(!threshold){return true;} 43var cannotType=$.inArray($field.attr('type'),['button','checkbox','file','hidden','image','radio','reset','submit'])!==-1;return(cannotType||$field.val().length>=threshold);},_onError:function(e){if(e.isDefaultPrevented()){return;} 44if('submitted'===this.options.live){this.options.live='enabled';var that=this;for(var field in this.options.fields){(function(f){var fields=that.getFieldElements(f);if(fields.length){var type=$(fields[0]).attr('type'),event=('radio'===type||'checkbox'===type||'file'===type||'SELECT'===$(fields[0]).get(0).tagName)?'change':that._changeEvent,trigger=that.options.fields[field].trigger||that.options.trigger||event,events=$.map(trigger.split(' '),function(item){return item+'.live.bv';}).join(' ');fields.off(events).on(events,function(){if(that._exceedThreshold($(this))){that.validateField($(this));}});}})(field);}} 45for(var i=0;i<this.$invalidFields.length;i++){var $field=this.$invalidFields.eq(i),autoFocus=this._isOptionEnabled($field.attr('data-bv-field'),'autoFocus');if(autoFocus){var $tabPane=$field.parents('.tab-pane'),tabId;if($tabPane&&(tabId=$tabPane.attr('id'))){$('a[href="#'+tabId+'"][data-toggle="tab"]').tab('show');} 46$field.trigger("focus");break;}}},_onSuccess:function(e){if(e.isDefaultPrevented()){return;} 47this.disableSubmitButtons(true).defaultSubmit();},_onFieldValidated:function($field,validatorName){var field=$field.attr('data-bv-field'),validators=this.options.fields[field].validators,counter={},numValidators=0,data={bv:this,field:field,element:$field,validator:validatorName,result:$field.data('bv.response.'+validatorName)};if(validatorName){switch($field.data('bv.result.'+validatorName)){case this.STATUS_INVALID:$field.trigger($.Event(this.options.events.validatorError),data);break;case this.STATUS_VALID:$field.trigger($.Event(this.options.events.validatorSuccess),data);break;default:break;}} 48counter[this.STATUS_NOT_VALIDATED]=0;counter[this.STATUS_VALIDATING]=0;counter[this.STATUS_INVALID]=0;counter[this.STATUS_VALID]=0;
48for(var v in validators){if(validators[v].enabled===false){continue;} 49numValidators++;var result=$field.data('bv.result.'+v);if(result){counter[result]++;}} 50if(counter[this.STATUS_VALID]===numValidators){this.$invalidFields=this.$invalidFields.not($field);$field.trigger($.Event(this.options.events.fieldSuccess),data);} 51else if((counter[this.STATUS_NOT_VALIDATED]===0||!this._isOptionEnabled(field,'verbose'))&&counter[this.STATUS_VALIDATING]===0&&counter[this.STATUS_INVALID]>0){this.$invalidFields=this.$invalidFields.add($field);$field.trigger($.Event(this.options.events.fieldError),data);}},_isOptionEnabled:function(field,option){if(this.options.fields[field]&&(this.options.fields[field][option]==='true'||this.options.fields[field][option]===true)){return true;} 52if(this.options.fields[field]&&(this.options.fields[field][option]==='false'||this.options.fields[field][option]===false)){return false;} 53return this.options[option]==='true'||this.options[option]===true;},getFieldElements:function(field){if(!this._cacheFields[field]){this._cacheFields[field]=(this.options.fields[field]&&this.options.fields[field].selector)?$(this.options.fields[field].selector):this.$form.find('[name="'+field+'"]');} 54return this._cacheFields[field];},getOptions:function(field,validator,option){if(!field){return option?this.options[option]:this.options;} 55if('object'===typeof field){field=field.attr('data-bv-field');} 56if(!this.options.fields[field]){return null;} 57var options=this.options.fields[field];if(!validator){return option?options[option]:options;} 58if(!options.validators||!options.validators[validator]){return null;} 59return option?options.validators[validator][option]:options.validators[validator];},disableSubmitButtons:function(disabled){if(!disabled){this.$form.find(this.options.submitButtons).removeAttr('disabled');}else if(this.options.live!=='disabled'){this.$form.find(this.options.submitButtons).attr('disabled','disabled');} 60return this;},validate:function(){if(!this.options.fields){return this;} 61this.disableSubmitButtons(true);this._submitIfValid=false;for(var field in this.options.fields){this.validateField(field);} 62this._submit();this._submitIfValid=true;return this;},validateField:function(field){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field');break;case'string':fields=this.getFieldElements(field);break;default:break;} 63if(fields.length===0||!this.options.fields[field]||this.options.fields[field].enabled===false){return this;} 64var that=this,type=fields.attr('type'),total=('radio'===type||'checkbox'===type)?1:fields.length,updateAll=('radio'===type||'checkbox'===type),validators=this.options.fields[field].validators,verbose=this._isOptionEnabled(field,'verbose'),validatorName,validateResult;for(var i=0;i<total;i++){var $field=fields.eq(i);if(this._isExcluded($field)){continue;} 65var stop=false;
65for(validatorName in validators){if($field.data('bv.dfs.'+validatorName)){$field.data('bv.dfs.'+validatorName).reject();} 66if(stop){break;} 67var result=$field.data('bv.result.'+validatorName);if(result===this.STATUS_VALID||result===this.STATUS_INVALID){this._onFieldValidated($field,validatorName);continue;}else if(validators[validatorName].enabled===false){this.updateStatus(updateAll?field:$field,this.STATUS_VALID,validatorName);continue;} 68$field.data('bv.result.'+validatorName,this.STATUS_VALIDATING);validateResult=$.fn.bootstrapValidator.validators[validatorName].validate(this,$field,validators[validatorName]);if('object'===typeof validateResult&&validateResult.resolve){this.updateStatus(updateAll?field:$field,this.STATUS_VALIDATING,validatorName);$field.data('bv.dfs.'+validatorName,validateResult);validateResult.done(function($f,v,response){$f.removeData('bv.dfs.'+v).data('bv.response.'+v,response);if(response.message){that.updateMessage($f,v,response.message);} 69that.updateStatus(updateAll?$f.attr('data-bv-field'):$f,response.valid?that.STATUS_VALID:that.STATUS_INVALID,v);if(response.valid&&that._submitIfValid===true){that._submit();}else if(!response.valid&&!verbose){stop=true;}});} 70else if('object'===typeof validateResult&&validateResult.valid!==undefined&&validateResult.message!==undefined){$field.data('bv.response.'+validatorName,validateResult);this.updateMessage(updateAll?field:$field,validatorName,validateResult.message);this.updateStatus(updateAll?field:$field,validateResult.valid?this.STATUS_VALID:this.STATUS_INVALID,validatorName);if(!validateResult.valid&&!verbose){break;}} 71else if('boolean'===typeof validateResult){$field.data('bv.response.'+validatorName,validateResult);this.updateStatus(updateAll?field:$field,validateResult?this.STATUS_VALID:this.STATUS_INVALID,validatorName);if(!validateResult&&!verbose){break;}}}} 72return this;},updateMessage:function(field,validator,message){var $fields=$([]);switch(typeof field){case'object':$fields=field;field=field.attr('data-bv-field');break;case'string':$fields=this.getFieldElements(field);break;default:break;} 73$fields.each(function(){$(this).data('bv.messages').find('.help-block[data-bv-validator="'+validator+'"][data-bv-for="'+field+'"]').html(message);});},updateStatus:function(field,status,validatorName){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field');break;case'string':fields=this.getFieldElements(field);break;default:break;} 74if(status===this.STATUS_NOT_VALIDATED){this._submitIfValid=false;} 75var that=this,type=fields.attr('type'),group=this.options.fields[field].group||this.options.group,total=('radio'===type||'checkbox'===type)?1:fields.length;for(var i=0;i<total;i++){var $field=fields.eq(i);if(this._isExcluded($field)){continue;} 76var currentStatus=status;if($field.data('smartform-invalid')===true){var isEmpty=($field.val()||'').trim()==='';var validatorNamesToCheck=['phone'];if(isEmpty){$field.data('smartform-invalid',false);}else if(validatorNamesToCheck.includes(validatorName)&¤tStatus===this.STATUS_VALID){currentStatus=this.STATUS_INVALID;}} 77var $parent=$field.parents(group),$message=$field.data('bv.messages'),$allErrors=$message.find('.help-block[data-bv-validator][data-bv-for="'+field+'"]'),$errors=validatorName?$allErrors.filter('[data-bv-validator="'+validatorName+'"]'):$allErrors,$icon=$field.data('bv.icon'),container=('function'===typeof(this.options.fields[field].container||this.options.container))?(this.options.fields[field].container||this.options.container).call(this,$field,this):(this.options.fields[field].container||this.options.container),isValidField=null;if(validatorName){$field.data('bv.result.'+validatorName,currentStatus);}else{for(var v in this.options.fields[field].validators){$field.data('bv.result.'+v,currentStatus);}} 78$errors.attr('data-bv-result',currentStatus);var $tabPane=$field.parents('.tab-pane'),tabId,$tab;if($tabPane&&(tabId=$tabPane.attr('id'))){$tab=$('a[href="#'+tabId+'"][data-toggle="tab"]').parent();} 79switch(currentStatus){case this.STATUS_VALIDATING:isValidField=null;this.disableSubmitButtons(true);$parent.removeClass('has-success').removeClass('has-error');if($icon){$icon.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).addClass(this.options.feedbackIcons.validating).show();} 80if($tab){$tab.removeClass('bv-tab-success').removeClass('bv-tab-error');} 81break;case this.STATUS_INVALID:isValidField=false;this.disableSubmitButtons(true);$parent.removeClass('has-success').addClass('has-error');if($icon){$icon.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.validating).addClass(this.options.feedbackIcons.invalid).show();} 82if($tab){$tab.removeClass('bv-tab-success').addClass('bv-tab-error');} 83break;case this.STATUS_VALID:isValidField=($allErrors.filter('[data-bv-result="'+this.STATUS_NOT_VALIDATED+'"]').length===0)?($allErrors.filter('[data-bv-result="'+this.STATUS_VALID+'"]').length===$allErrors.length):null;if(isValidField!==null){this.disableSubmitButtons(this.$submitButton?!this.isValid():!isValidField);if($icon){$icon.removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).removeClass(this.options.feedbackIcons.valid).addClass(isValidField?this.options.feedbackIcons.valid:this.options.feedbackIcons.invalid).show();}} 84$parent.removeClass('has-error has-success').addClass(this.isValidContainer($parent)?'has-success':'has-error');if($tab){$tab.removeClass('bv-tab-success').removeClass('bv-tab-error').addClass(this.isValidContainer($tabPane)?'bv-tab-success':'bv-tab-error');} 85break;case this.STATUS_NOT_VALIDATED:default:isValidField=null;this.disableSubmitButtons(false);$parent.removeClass('has-success').removeClass('has-error');if($icon){$icon.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).hide();} 86if($tab){$tab.removeClass('bv-tab-success').removeClass('bv-tab-error');} 87break;} 88switch(true){case($icon&&'tooltip'===container):(isValidField===false)?$icon.css('cursor','pointer').tooltip('destroy').tooltip({container:'body',html:true,placement:'auto top',title:$allErrors.filter('[data-bv-result="'+that.STATUS_INVALID+'"]').eq(0).html()}):$icon.css('cursor','').tooltip('destroy');break;case($icon&&'popover'===container):(isValidField===false)?$icon.css('cursor','pointer').popover('destroy').popover({container:'body',content:$allErrors.filter('[data-bv-result="'+that.STATUS_INVALID+'"]').eq(0).html(),html:true,placement:'auto top',trigger:'hover click'}):$icon.css('cursor','').popover('destroy');break;default:(currentStatus===this.STATUS_INVALID)?$errors.show():$errors.hide();break;} 89$field.trigger($.Event(this.options.events.fieldStatus),{bv:this,field:field,element:$field,status:currentStatus});this._onFieldValidated($field,validatorName);} 90return this;},isValid:function(){for(var field in this.options.fields){if(!this.isValidField(field)){return false;}} 91return true;},isValidField:function(field){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field');break;case'string':fields=this.getFieldElements(field);break;default:break;} 92if(fields.length===0||!this.options.fields[field]||this.options.fields[field].enabled===false){return true;} 93var type=fields.attr('type'),total=('radio'===type||'checkbox'===type)?1:fields.length,$field,validatorName,status;for(var i=0;i<total;i++){$field=fields.eq(i);if(this._isExcluded($field)){continue;}
94for(validatorName in this.options.fields[field].validators){if(this.options.fields[field].validators[validatorName].enabled===false){continue;} 95status=$field.data('bv.result.'+validatorName);if(status!==this.STATUS_VALID){return false;}}} 96return true;},isValidContainer:function(container){var that=this,map={},$container=('string'===typeof container)?$(container):container;if($container.length===0){return true;} 97$container.find('[data-bv-field]').each(function(){var $field=$(this),field=$field.attr('data-bv-field');if(!that._isExcluded($field)&&!map[field]){map[field]=$field;}});for(var field in map){var $f=map[field];if($f.data('bv.messages').find('.help-block[data-bv-validator][data-bv-for="'+field+'"]').filter('[data-bv-result="'+this.STATUS_INVALID+'"]').length>0){return false;}} 98return true;},defaultSubmit:function(){if(this.$submitButton){$('<input/>').attr('type','hidden').attr('data-bv-submit-hidden','').attr('name',this.$submitButton.attr('name')).val(this.$submitButton.val()).appendTo(this.$form);} 99this.$form.off('submit.bv').submit();},getInvalidFields:function(){return this.$invalidFields;},getSubmitButton:function(){return this.$submitButton;},getMessages:function(field,validator){var that=this,messages=[],$fields=$([]);switch(true){case(field&&'object'===typeof field):$fields=field;break;case(field&&'string'===typeof field):var f=this.getFieldElements(field);if(f.length>0){var type=f.attr('type');$fields=('radio'===type||'checkbox'===type)?f.eq(0):f;} 100break;default:$fields=this.$invalidFields;break;} 101var filter=validator?'[data-bv-validator="'+validator+'"]':'';$fields.each(function(){messages=messages.concat($(this).data('bv.messages').find('.help-block[data-bv-for="'+$(this).attr('data-bv-field')+'"][data-bv-result="'+that.STATUS_INVALID+'"]'+filter).map(function(){var v=$(this).attr('data-bv-validator'),f=$(this).attr('data-bv-for');return(that.options.fields[f].validators[v].enabled===false)?'':$(this).html();}).get());});return messages;},updateOption:function(field,validator,option,value){if('object'===typeof field){field=field.attr('data-bv-field');} 102if(this.options.fields[field]&&this.options.fields[field].validators[validator]){this.options.fields[field].validators[validator][option]=value;
102this.updateStatus(field,this.STATUS_NOT_VALIDATED,validator);} 103return this;},addField:function(field,options){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field')||field.attr('name');break;case'string':delete this._cacheFields[field];fields=this.getFieldElements(field);break;default:break;} 104fields.attr('data-bv-field',field);var type=fields.attr('type'),total=('radio'===type||'checkbox'===type)?1:fields.length;for(var i=0;i<total;i++){var $field=fields.eq(i);var opts=this._parseOptions($field);opts=(opts===null)?options:$.extend(true,options,opts);this.options.fields[field]=$.extend(true,this.options.fields[field],opts);this._cacheFields[field]=this._cacheFields[field]?this._cacheFields[field].add($field):$field;this._initField(('checkbox'===type||'radio'===type)?field:$field);} 105this.disableSubmitButtons(false);this.$form.trigger($.Event(this.options.events.fieldAdded),{field:field,element:fields,options:this.options.fields[field]});return this;},removeField:function(field){var fields=$([]);switch(typeof field){case'object':fields=field;field=field.attr('data-bv-field')||field.attr('name');fields.attr('data-bv-field',field);break;case'string':fields=this.getFieldElements(field);break;default:break;} 106if(fields.length===0){return this;} 107var type=fields.attr('type'),total=('radio'===type||'checkbox'===type)?1:fields.length;for(var i=0;i<total;i++){var $field=fields.eq(i);this.$invalidFields=this.$invalidFields.not($field);this._cacheFields[field]=this._cacheFields[field].not($field);} 108if(!this._cacheFields[field]||this._cacheFields[field].length===0){delete this.options.fields[field];} 109if('checkbox'===type||'radio'===type){this._initField(field);} 110this.disableSubmitButtons(false);this.$form.trigger($.Event(this.options.events.fieldRemoved),{field:field,element:fields});return this;},resetField:function(field,resetValue){var $fields=$([]);switch(typeof field){case'object':$fields=field;field=field.attr('data-bv-field');break;case'string':$fields=this.getFieldElements(field);break;default:break;} 111var total=$fields.length;if(this.options.fields[field]){for(var i=0;i<total;i++){for(var validator in this.options.fields[field].validators){$fields.eq(i).removeData('bv.dfs.'+validator);}}} 112this.updateStatus(field,this.STATUS_NOT_VALIDATED);if(resetValue){var type=$fields.attr('type');('radio'===type||'checkbox'===type)?$fields.removeAttr('checked').removeAttr('selected'):$fields.val('');} 113return this;},resetForm:function(resetValue){for(var field in this.options.fields){this.resetField(field,resetValue);} 114this.$invalidFields=$([]);this.$submitButton=null;this.disableSubmitButtons(false);return this;},revalidateField:function(field){this.updateStatus(field,this.STATUS_NOT_VALIDATED).validateField(field);return this;},enableFieldValidators:function(field,enabled,validatorName){var validators=this.options.fields[field].validators;if(validatorName&&validators&&validators[validatorName]&&validators[validatorName].enabled!==enabled){this.options.fields[field].validators[validatorName].enabled=enabled;
114this.updateStatus(field,this.STATUS_NOT_VALIDATED,validatorName);} 115else if(!validatorName&&this.options.fields[field].enabled!==enabled){this.options.fields[field].enabled=enabled;for(var v in validators){this.enableFieldValidators(field,enabled,v);}} 116return this;},getDynamicOption:function(field,option){var $field=('string'===typeof field)?this.getFieldElements(field):field,value=$field.val();if('function'===typeof option){return $.fn.bootstrapValidator.helpers.call(option,[value,this,$field]);} 117else if('string'===typeof option){var $f=this.getFieldElements(option);if($f.length){return $f.val();} 118else{return $.fn.bootstrapValidator.helpers.call(option,[value,this,$field])||option;}} 119return null;},destroy:function(){var field,fields,$field,validator,$icon,group;for(field in this.options.fields){fields=this.getFieldElements(field);group=this.options.fields[field].group||this.options.group;for(var i=0;i<fields.length;i++){$field=fields.eq(i);$field.data('bv.messages').find('.help-block[data-bv-validator][data-bv-for="'+field+'"]').remove().end().end().removeData('bv.messages').parents(group).removeClass('has-feedback has-error has-success').end().off('.bv').removeAttr('data-bv-field');$icon=$field.data('bv.icon');if($icon){var container=('function'===typeof(this.options.fields[field].container||this.options.container))?(this.options.fields[field].container||this.options.container).call(this,$field,this):(this.options.fields[field].container||this.options.container);switch(container){case'tooltip':$icon.tooltip('destroy').remove();break;case'popover':$icon.popover('destroy').remove();break;default:$icon.remove();break;}} 120$field.removeData('bv.icon');
120for(validator in this.options.fields[field].validators){if($field.data('bv.dfs.'+validator)){$field.data('bv.dfs.'+validator).reject();} 121$field.removeData('bv.result.'+validator).removeData('bv.response.'+validator).removeData('bv.dfs.'+validator);if('function'===typeof $.fn.bootstrapValidator.validators[validator].destroy){$.fn.bootstrapValidator.validators[validator].destroy(this,$field,this.options.fields[field].validators[validator]);}}}} 122this.disableSubmitButtons(false);this.$hiddenButton.remove();this.$form.removeClass(this.options.elementClass).off('.bv').removeData('bootstrapValidator').find('[data-bv-submit-hidden]').remove().end().find('[type="submit"]').off('click.bv');}};$.fn.bootstrapValidator=function(option){var params=arguments;return this.each(function(){var $this=$(this),data=$this.data('bootstrapValidator'),options='object'===typeof option&&option;if(!data){data=new BootstrapValidator(this,options);$this.data('bootstrapValidator',data);} 123if('string'===typeof option){data[option].apply(data,Array.prototype.slice.call(params,1));}});};$.fn.bootstrapValidator.DEFAULT_OPTIONS={autoFocus:true,container:null,elementClass:'bv-form',events:{formInit:'init.form.bv',formError:'validationError.form.bv',formSuccess:'success.form.bv',fieldAdded:'added.field.bv',fieldRemoved:'removed.field.bv',fieldInit:'init.field.bv',fieldError:'validationError.field.bv',fieldSuccess:'success.field.bv',fieldStatus:'status.field.bv',validatorError:'validationError.validator.bv',validatorSuccess:'success.validator.bv'},excluded:[':disabled',':hidden',':not(:visible)'],feedbackIcons:{valid:null,invalid:null,validating:null},fields:null,group:'.form-group',live:'enabled',message:'This value is not valid',submitButtons:'[type="submit"]',threshold:null,verbose:true};$.fn.bootstrapValidator.validators={};$.fn.bootstrapValidator.i18n={};$.fn.bootstrapValidator.Constructor=BootstrapValidator;$.fn.bootstrapValidator.helpers={call:function(functionName,args){if('function'===typeof functionName){return functionName.apply(this,args);}else if('string'===typeof functionName){if('()'===functionName.substring(functionName.length-2)){functionName=functionName.substring(0,functionName.length-2);} 124var ns=functionName.split('.'),func=ns.pop(),context=window;for(var i=0;i<ns.length;i++){context=context[ns[i]];} 125return(typeof context[func]==='undefined')?null:context[func].apply(this,args);}},format:function(message,parameters){if(!$.isArray(parameters)){parameters=[parameters];} 126for(var i in parameters){message=message.replace('%s',parameters[i]);} 127return message;},date:function(year,month,day,notInFuture){if(isNaN(year)||isNaN(month)||isNaN(day)){return false;} 128if(day.length>2||month.length>2||year.length>4){return false;} 129day=parseInt(day,10);month=parseInt(month,10);year=parseInt(year,10);if(year<1000||year>9999||month<=0||month>12){return false;} 130var numDays=[31,28,31,30,31,30,31,31,30,31,30,31];if(year%400===0||(year%100!==0&&year%4===0)){numDays[1]=29;} 131if(day<=0||day>numDays[month-1]){return false;} 132if(notInFuture===true){var currentDate=new Date(),currentYear=currentDate.getFullYear(),currentMonth=currentDate.getMonth(),currentDay=currentDate.getDate();return(year<currentYear||(year===currentYear&&month-1<currentMonth)||(year===currentYear&&month-1===currentMonth&&day<currentDay));} 133return true;},luhn:function(value){var length=value.length,mul=0,prodArr=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],sum=0;while(length--){sum+=prodArr[mul][parseInt(value.charAt(length),10)];mul^=1;} 134return(sum%10===0&&sum>0);},mod11And10:function(value){var check=5,length=value.length;for(var i=0;i<length;i++){check=(((check||10)*2)%11+parseInt(value.charAt(i),10))%10;} 135return(check===1);},mod37And36:function(value,alphabet){alphabet=alphabet||'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';var modulus=alphabet.length,length=value.length,check=Math.floor(modulus / 2);for(var i=0;i<length;i++){check=(((check||modulus)*2)%(modulus+1)+alphabet.indexOf(value.charAt(i)))%modulus;} 136return(check===1);}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.emailAddress=$.extend($.fn.bootstrapValidator.i18n.emailAddress||{},{'default':'Please enter a valid email address'});$.fn.bootstrapValidator.validators.emailAddress={html5Attributes:{message:'message',multiple:'multiple',separator:'separator'},enableByHtml5:function($field){return('email'===$field.attr('type'));}
136,validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 137var emailRegExp=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,allowMultiple=options.multiple===true||options.multiple==='true';if(allowMultiple){var separator=options.separator||/[,;]/,addresses=this._splitEmailAddresses(value,separator);for(var i=0;i<addresses.length;i++){if(!emailRegExp.test(addresses[i])){return false;}} 138return true;}else{return emailRegExp.test(value);}},_splitEmailAddresses:function(emailAddresses,separator){var quotedFragments=emailAddresses.split(/"/),quotedFragmentCount=quotedFragments.length,emailAddressArray=[],nextEmailAddress='';for(var i=0;i<quotedFragmentCount;i++){if(i%2===0){var splitEmailAddressFragments=quotedFragments[i].split(separator),splitEmailAddressFragmentCount=splitEmailAddressFragments.length;if(splitEmailAddressFragmentCount===1){nextEmailAddress+=splitEmailAddressFragments[0];}else{emailAddressArray.push(nextEmailAddress+splitEmailAddressFragments[0]);for(var j=1;j<splitEmailAddressFragmentCount-1;j++){emailAddressArray.push(splitEmailAddressFragments[j]);} 139nextEmailAddress=splitEmailAddressFragments[splitEmailAddressFragmentCount-1];}}else{nextEmailAddress+='"'+quotedFragments[i];if(i<quotedFragmentCount-1){nextEmailAddress+='"';}}} 140emailAddressArray.push(nextEmailAddress);return emailAddressArray;}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.identical=$.extend($.fn.bootstrapValidator.i18n.identical||{},{'default':'Please enter the same value'});$.fn.bootstrapValidator.validators.identical={html5Attributes:{message:'message',field:'field'},validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 141var compareWith=validator.getFieldElements(options.field);if(compareWith===null||compareWith.length===0){return true;} 142if(value===compareWith.val()){validator.updateStatus(options.field,validator.STATUS_VALID,'identical');return true;}else{return false;}}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.integer=$.extend($.fn.bootstrapValidator.i18n.integer||{},{'default':'Please enter a valid number'});$.fn.bootstrapValidator.validators.integer={enableByHtml5:function($field){return('number'===$field.attr('type'))&&($field.attr('step')===undefined||$field.attr('step')%1===0);},validate:function(validator,$field,options){if(this.enableByHtml5($field)&&$field.get(0).validity&&$field.get(0).validity.badInput===true){return false;} 143var value=$field.val();if(value===''){return true;} 144return/^(?:-?(?:0|[0-9][0-9]*))$/.test(value);}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.notEmpty=$.extend($.fn.bootstrapValidator.i18n.notEmpty||{},{'default':'Please enter a value'});$.fn.bootstrapValidator.validators.notEmpty={enableByHtml5:function($field){var required=$field.attr('required')+'';return('required'===required||'true'===required);},validate:function(validator,$field,options){var type=$field.attr('type');if('radio'===type||'checkbox'===type){return validator.getFieldElements($field.attr('data-bv-field')).filter(':checked').length>0;} 145if('number'===type&&$field.get(0).validity&&$field.get(0).validity.badInput===true){return true;} 146return $.trim($field.val())!=='';}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.phone=$.extend($.fn.bootstrapValidator.i18n.phone||{},{'default':'Please enter a valid phone number',countryNotSupported:'The country code %s is not supported',country:'Please enter a valid phone number in %s',phoneValidationWarning:'Are you sure this is a valid phone number?',countries:{BR:'Brazil',CH:'Switzerland',CN:'China',CZ:'Czech Republic',DE:'Germany',DK:'Denmark',ES:'Spain',FR:'France',GB:'United Kingdom',HU:'Hungary',IT:'Italy',LI:'Liechtenstein',MA:'Morocco',PK:'Pakistan',RO:'Romania',RU:'Russia',SK:'Slovakia',TH:'Thailand',US:'USA',VE:'Venezuela'}});$.fn.bootstrapValidator.validators.phone={html5Attributes:{message:'message',country:'country'},COUNTRY_CODES:['BR','CH','CN','CZ','DE','DK','ES','HR','FR','GB','HU','IT','LI','MA','PK','RO','RU','SI','SK','TH','US','VE'],validate:function(vali
146dator,$field,options){var value=$field.val();if(value===''){return true;} 147var country=options.country;if(typeof country!=='string'||$.inArray(country,this.COUNTRY_CODES)===-1){country=validator.getDynamicOption($field,country);} 148var isValid=true;switch(country.toUpperCase()){case'BR':value=$.trim(value);isValid=(/^(([\d]{4}[-.\s]{1}[\d]{2,3}[-.\s]{1}[\d]{2}[-.\s]{1}[\d]{2})|([\d]{4}[-.\s]{1}[\d]{3}[-.\s]{1}[\d]{4})|((\(?\+?[0-9]{2}\)?\s?)?(\(?\d{2}\)?\s?)?\d{4,5}[-.\s]?\d{4}))$/).test(value);break;case'CH':isValid=/^((((00)|\+)(41)([- ]?))|(0))?( *\d *){9}$/.test(value);break;case'CN':value=$.trim(value);isValid=(/^((00|\+)?(86(?:-| )))?((\d{11})|(\d{3}[- ]{1}\d{4}[- ]{1}\d{4})|((\d{2,4}[- ]){1}(\d{7,8}|(\d{3,4}[- ]{1}\d{4}))([- ]{1}\d{1,4})?))$/).test(value);break;case'CZ':isValid=/^(((00)([- ]?)|\+)(420)([- ]?))?((\d{3})([- ]?)){2}(\d{3})$/.test(value);break;case'DE':value=$.trim(value);isValid=(/^(((((((00|\+)49[ \-/]?)|0)[1-9][0-9]{1,4})[\-/]?)|((((00|\+)49\()|\(0)[1-9][0-9]{1,4}\)[\-/]?))[0-9]{1,7}([\-/]?[0-9]{1,5})?)$/).test(value);break;case'DK':value=$.trim(value);isValid=(/^(\+45|0045|\(45\))?\s?[2-9](\s?\d){7}$/).test(value);break;case'ES':value=$.trim(value);isValid=(/^(?:(?:(?:\+|00)34\D?))?(?:9|6)(?:\d\D?){8}$/).test(value);break;case'FR':value=$.trim(value);isValid=(/^(?:(?:(?:\+|00)33[ ]?(?:\(0\)[ ]?)?)|0){1}[1-9]{1}([ .-]?)(?:\d{2}\1?){3}\d{2}$/).test(value);break;case'GB':value=$.trim(value);isValid=(/^\(?(?:(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?\(?(?:0\)?[\s-]?\(?)?|0)(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}|\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4}|\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3})|\d{5}\)?[\s-]?\d{4,5}|8(?:00[\s-]?11[\s-]?11|45[\s-]?46[\s-]?4\d))(?:(?:[\s-]?(?:x|ext\.?\s?|\#)\d+)?)$/).test(value);break;case'HU':value=$.trim(value);isValid=(/^((?:\+?3|0)6)(?:-|\()?(\d{1,2})(?:-|\))?(\d{3})-?(\d{3,4})$/).test(value);break;case'IT':value=value.replace(/[\\)\\(]/g,'');value=value.replace(/[ /-]/g,'');isValid=(/^((00|\+)39)?(3(\d{8,9})|0(\d{8,10}))$/).test(value);break;case'HR':value=value.replace(/[ /-]/g,'');isValid=/^(((00)([- ]?)|\+)(385)([- ]?))?([0]?)(\d{1})?(\d{8})$/.test(value);break;case'LI':isValid=/^(((00)([- ]?)|\+)(423)([- ]?))( *\d *){7}$/.test(value);break;case'MA':value=$.trim(value);isValid=(/^(?:(?:(?:\+|00)212[\s]?(?:[\s]?\(0\)[\s]?)?)|0){1}(?:5[\s.-]?[2-3]|6[\s.-]?[13-9]){1}[0-9]{1}(?:[\s.-]?\d{2}){3}$/).test(value);break;case'PK':value=$.trim(value);isValid=(/^0?3[0-9]{2}[0-9]{7}$/).test(value);break;case'RO':isValid=(/^(\+4|)?(07[0-8]{1}[0-9]{1}|02[0-9]{2}|03[0-9]{2}){1}?(\s|\.|\-)?([0-9]{3}(\s|\.|\-|)){2}$/g).test(value);break;case'RU':isValid=(/^((8|\+7|007)[\-\.\/ ]?)?([\(\/\.]?\d{3}[\)\/\.]?[\-\.\/ ]?)?[\d\-\.\/ ]{7,10}$/g).test(value);break;case'SI':isValid=/^((((00)([- ]?)|\+)(386)([- ]?))|(0))?([1-9])(([- ]?)(\d)){7}$/.test(value);break;case'SK':isValid=/^((((00)([- ]?)|\+)(421|420)([- ]?))|(0 ?))?((\d{3})([- ]?)){2}(\d{3})$/.test(value);break;case'TH':isValid=(/^0\(?([6|8-9]{2})*-([0-9]{3})*-([0-9]{4})$/).test(value);break;case'VE':value=$.trim(value);isValid=(/^0(?:2(?:12|4[0-9]|5[1-9]|6[0-9]|7[0-8]|8[1-35-8]|9[1-5]|3[45789])|4(?:1[246]|2[46]))\d{7}$/).test(value);break;case'US':value=value.replace(/\D/g,'');isValid=(/^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/).test(value)&&(value.length===10);break;default:isValid=(/^\d{3,14}$/).test(value);break;} 149var customMessage=$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.phone.country,$.fn.bootstrapValidator.i18n.phone.countries[country]);$field.removeClass('validation-warning');if(!isValid){value=$field.val().replace(/\s/g,'');var normalizedValue=value.replace(/^00/,'+');if(/^\+42[01]/.test(normalizedValue)){isValid=/^\+42[01]\d{9}$/.test(normalizedValue);}else{if(country.toUpperCase()==="CZ"||country.toUpperCase()==="SK"){isValid=(/^(\+|00)(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{6,10}$/).test(value);}else{isValid=(/^(\+|00)(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\d{1,14}$/).test(value);} 150if(isValid){customMessage=$.fn.bootstrapValidator.i18n.phone.phoneValidationWarning;$field.addClass('validation-warning');}}} 151return{valid:isValid,message:customMessage}}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.regexp=$.extend($.fn.bootstrapValidator.i18n.regexp||{},{'default':'Please enter a value matching the pattern'});$.fn.bootstrapValidator.validators.regexp={html5Attributes:{message:'message',regexp:'regexp'},enableByHtml5:function($field){var pattern=$field.attr('pattern');if(pattern){return{regexp:pattern};} 152return false;}
152,validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 153var regexp=('string'===typeof options.regexp)?new RegExp(options.regexp):options.regexp;return regexp.test(value);}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.stringLength=$.extend($.fn.bootstrapValidator.i18n.stringLength||{},{'default':'Please enter a value with valid length',less:'Please enter less than %s characters',more:'Please enter more than %s characters',between:'Please enter value between %s and %s characters long'});$.fn.bootstrapValidator.validators.stringLength={html5Attributes:{message:'message',min:'min',max:'max',trim:'trim',utf8bytes:'utf8Bytes'},enableByHtml5:function($field){var options={},maxLength=$field.attr('maxlength'),minLength=$field.attr('minlength');if(maxLength){options.max=parseInt(maxLength,10);} 154if(minLength){options.min=parseInt(minLength,10);} 155return $.isEmptyObject(options)?false:options;},validate:function(validator,$field,options){var value=$field.val();if(options.trim===true||options.trim==='true'){value=$.trim(value);} 156if(value===''){return true;} 157var min=$.isNumeric(options.min)?options.min:validator.getDynamicOption($field,options.min),max=$.isNumeric(options.max)?options.max:validator.getDynamicOption($field,options.max),utf8Length=function(str){var s=str.length;for(var i=str.length-1;i>=0;i--){var code=str.charCodeAt(i);if(code>0x7f&&code<=0x7ff){s++;}else if(code>0x7ff&&code<=0xffff){s+=2;} 158if(code>=0xDC00&&code<=0xDFFF){i--;}} 159return s;},length=options.utf8Bytes?utf8Length(value):value.length,isValid=true,message=options.message||$.fn.bootstrapValidator.i18n.stringLength['default'];if((min&&length<parseInt(min,10))||(max&&length>parseInt(max,10))){isValid=false;} 160switch(true){case(!!min&&!!max):message=$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.stringLength.between,[parseInt(min,10),parseInt(max,10)]);break;case(!!min):if(parseInt(min,10)>1&&parseInt(min,10)<5&&$.fn.bootstrapValidator.i18n.stringLength.more_than_two){message=$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.stringLength.more_than_two,parseInt(min,10));}else{message=$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.stringLength.more,parseInt(min,10));} 161break;case(!!max):message=$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.stringLength.less,parseInt(max,10));break;default:break;} 162return{valid:isValid,message:message};}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.vat=$.extend($.fn.bootstrapValidator.i18n.vat||{},{'default':'Please enter a valid VAT number',countryNotSupported:'The country code %s is not supported',country:'Please enter a valid VAT number in %s',countries:{AT:'Austria',BE:'Belgium',BG:'Bulgaria',BR:'Brazil',CH:'Switzerland',CY:'Cyprus',CZ:'Czech Republic',DE:'Germany',DK:'Denmark',EE:'Estonia',ES:'Spain',FI:'Finland',FR:'France',GB:'United Kingdom',GR:'Greek',EL:'Greek',HU:'Hungary',HR:'Croatia',IE:'Ireland',IS:'Iceland',IT:'Italy',LT:'Lithuania',LU:'Luxembourg',LV:'Latvia',MT:'Malta',NL:'Netherlands',NO:'Norway',PL:'Poland',PT:'Portugal',RO:'Romania',RU:'Russia',RS:'Serbia',SE:'Sweden',SI:'Slovenia',SK:'Slovakia',VE:'Venezuela',ZA:'South Africa'}});$.fn.bootstrapValidator.validators.vat={html5Attributes:{message:'message',country:'country'},COUNTRY_CODES:['AT','BE','BG','BR','CH','CY','CZ','DE','DK','EE','EL','ES','FI','FR','GB','GR','HR','HU','IE','IS','IT','LT','LU','LV','MT','NL','NO','PL','PT','RO','RU','RS','SE','SK','SI','VE','ZA'],validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 163var country=options.country;if(!country){country=value.substr(0,2);}else if(typeof country!=='string'||$.inArray(country.toUpperCase(),this.COUNTRY_CODES)===-1){country=validator.getDynamicOption($field,country);} 164console.log(country);if($.inArray(country,this.COUNTRY_CODES)===-1){return true;} 165var method=['_',country.toLowerCase()].join('');return this[method](value)?true:{valid:false,message:$.fn.bootstrapValidator.helpers.format(
vendor: 14,315 bytes, lines 165-293
165options.message||$.fn.bootstrapValidator.i18n.vat.country,$.fn.bootstrapValidator.i18n.vat.countries[country.toUpperCase()])};},_at:function(value){if(/^ATU[0-9]{8}$/.test(value)){value=value.substr(2);} 166if(!/^U[0-9]{8}$/.test(value)){return false;} 167value=value.substr(1);var sum=0,weight=[1,2,1,2,1,2,1],temp=0;for(var i=0;i<7;i++){temp=parseInt(value.charAt(i),10)*weight[i];if(temp>9){temp=Math.floor(temp / 10)+temp%10;} 168sum+=temp;} 169sum=10-(sum+4)%10;if(sum===10){sum=0;} 170return(sum+''===value.substr(7,1));},_be:function(value){if(/^BE[0]{0,1}[0-9]{9}$/.test(value)){value=value.substr(2);} 171if(!/^[0]{0,1}[0-9]{9}$/.test(value)){return false;} 172if(value.length===9){value='0'+value;} 173if(value.substr(1,1)==='0'){return false;} 174var sum=parseInt(value.substr(0,8),10)+parseInt(value.substr(8,2),10);return(sum%97===0);},_bg:function(value){if(/^BG[0-9]{9,10}$/.test(value)){value=value.substr(2);} 175if(!/^[0-9]{9,10}$/.test(value)){return false;} 176var sum=0,i=0;if(value.length===9){for(i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*(i+1);} 177sum=sum%11;if(sum===10){sum=0;for(i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*(i+3);}} 178sum=sum%10;return(sum+''===value.substr(8));} 179else if(value.length===10){var egn=function(value){var year=parseInt(value.substr(0,2),10)+1900,month=parseInt(value.substr(2,2),10),day=parseInt(value.substr(4,2),10);if(month>40){year+=100;month-=40;}else if(month>20){year-=100;month-=20;} 180if(!$.fn.bootstrapValidator.helpers.date(year,month,day)){return false;} 181var sum=0,weight=[2,4,8,5,10,9,7,3,6];for(var i=0;i<9;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 182sum=(sum%11)%10;return(sum+''===value.substr(9,1));},pnf=function(value){var sum=0,weight=[21,19,17,13,11,9,7,3,1];for(var i=0;i<9;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 183sum=sum%10;return(sum+''===value.substr(9,1));},vat=function(value){var sum=0,weight=[4,3,2,7,6,5,4,3,2];for(var i=0;i<9;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 184sum=11-sum%11;if(sum===10){return false;} 185if(sum===11){sum=0;} 186return(sum+''===value.substr(9,1));};return(egn(value)||pnf(value)||vat(value));} 187return false;},_br:function(value){if(value===''){return true;} 188var cnpj=value.replace(/[^\d]+/g,'');if(cnpj===''||cnpj.length!==14){return false;} 189if(cnpj==='00000000000000'||cnpj==='11111111111111'||cnpj==='22222222222222'||cnpj==='33333333333333'||cnpj==='44444444444444'||cnpj==='55555555555555'||cnpj==='66666666666666'||cnpj==='77777777777777'||cnpj==='88888888888888'||cnpj==='99999999999999'){return false;} 190var length=cnpj.length-2,numbers=cnpj.substring(0,length),digits=cnpj.substring(length),sum=0,pos=length-7;for(var i=length;i>=1;i--){sum+=parseInt(numbers.charAt(length-i),10)*pos--;if(pos<2){pos=9;}} 191var result=sum%11<2?0:11-sum%11;if(result!==parseInt(digits.charAt(0),10)){return false;} 192length=length+1;numbers=cnpj.substring(0,length);sum=0;pos=length-7;for(i=length;i>=1;i--){sum+=parseInt(numbers.charAt(length-i),10)*pos--;if(pos<2){pos=9;}} 193result=sum%11<2?0:11-sum%11;return(result===parseInt(digits.charAt(1),10));},_ch:function(value){if(/^CHE[0-9]{9}(MWST)?$/.test(value)){value=value.substr(2);} 194if(!/^E[0-9]{9}(MWST)?$/.test(value)){return false;} 195value=value.substr(1);var sum=0,weight=[5,4,3,2,7,6,5,4];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 196sum=11-sum%11;if(sum===10){return false;} 197if(sum===11){sum=0;} 198return(sum+''===value.substr(8,1));},_cy:function(value){if(/^CY[0-5|9]{1}[0-9]{7}[A-Z]{1}$/.test(value)){value=value.substr(2);} 199if(!/^[0-5|9]{1}[0-9]{7}[A-Z]{1}$/.test(value)){return false;} 200if(value.substr(0,2)==='12'){return false;} 201var sum=0,translation={'0':1,'1':0,'2':5,'3':7,'4':9,'5':13,'6':15,'7':17,'8':19,'9':21};for(var i=0;i<8;i++){var temp=parseInt(value.charAt(i),10);if(i%2===0){temp=translation[temp+''];} 202sum+=temp;} 203sum='ABCDEFGHIJKLMNOPQRSTUVWXYZ'[sum%26];return(sum+''===value.substr(8,1));},_cz:function(value){if(/^CZ[0-9]{8,10}$/.test(value)){value=value.substr(2);}else{return false;} 204if(!/^[0-9]{8,10}$/.test(value)){return false;} 205var sum=0,i=0;if(value.length===8){if(value.charAt(0)+''==='9'){return false;} 206sum=0;for(i=0;i<7;i++){sum+=parseInt(value.charAt(i),10)*(8-i);} 207sum=11-sum%11;if(sum===10){sum=0;} 208if(sum===11){sum=1;} 209return(sum+''===value.substr(7,1));}else if(value.length===9&&(value.charAt(0)+''==='6')){sum=0;for(i=0;i<7;i++){sum+=parseInt(value.charAt(i+1),10)*(8-i);} 210sum=11-sum%11;if(sum===11){sum=1;} 211sum=[8,7,6,5,4,3,2,1,0,9,10][sum-1];return(sum+''===value.substr(8,1));}else if(value.length===9||value.length===10){var year=1900+parseInt(value.substr(0,2),10),month=parseInt(value.substr(2,2),10)%50%20,day=parseInt(value.substr(4,2),10);if(value.length===9){if(year>=1980){year-=100;} 212if(year>1953){return false;}}else if(year<1954){year+=100;} 213if(!$.fn.bootstrapValidator.helpers.date(year,month,day)){return false;} 214if(value.length===10){var check=parseInt(value.substr(0,9),10)%11;if(year<1985){check=check%10;} 215return(check+''===value.substr(9,1));} 216return true;} 217return false;},_de:function(value){if(/^DE[0-9]{9}$/.test(value)){value=value.substr(2);} 218if(!/^[0-9]{9}$/.test(value)){return false;} 219return $.fn.bootstrapValidator.helpers.mod11And10(value);},_dk:function(value){if(/^DK[0-9]{8}$/.test(value)){value=value.substr(2);} 220if(!/^[0-9]{8}$/.test(value)){return false;} 221var sum=0,weight=[2,7,6,5,4,3,2,1];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 222return(sum%11===0);},_ee:function(value){if(/^EE[0-9]{9}$/.test(value)){value=value.substr(2);} 223if(!/^[0-9]{9}$/.test(value)){return false;} 224var sum=0,weight=[3,7,1,3,7,1,3,7,1];for(var i=0;i<9;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 225return(sum%10===0);},_es:function(value){if(/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(value)){value=value.substr(2);} 226if(!/^[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(value)){return false;} 227var dni=function(value){var check=parseInt(value.substr(0,8),10);check='TRWAGMYFPDXBNJZSQVHLCKE'[check%23];return(check+''===value.substr(8,1));},nie=function(value){var check=['XYZ'.indexOf(value.charAt(0)),value.substr(1)].join('');check=parseInt(check,10);check='TRWAGMYFPDXBNJZSQVHLCKE'[check%23];return(check+''===value.substr(8,1));},cif=function(value){var first=value.charAt(0),check;if('KLM'.indexOf(first)!==-1){check=parseInt(value.substr(1,8),10);check='TRWAGMYFPDXBNJZSQVHLCKE'[check%23];return(check+''===value.substr(8,1));}else if('ABCDEFGHJNPQRSUVW'.indexOf(first)!==-1){var sum=0,weight=[2,1,2,1,2,1,2],temp=0;for(var i=0;i<7;i++){temp=parseInt(value.charAt(i+1),10)*weight[i];if(temp>9){temp=Math.floor(temp / 10)+temp%10;} 228sum+=temp;} 229sum=10-sum%10;return(sum+''===value.substr(8,1)||'JABCDEFGHI'[sum]===value.substr(8,1));} 230return false;};var first=value.charAt(0);if(/^[0-9]$/.test(first)){return dni(value);}else if(/^[XYZ]$/.test(first)){return nie(value);}else{return cif(value);}},_fi:function(value){if(/^FI[0-9]{8}$/.test(value)){value=value.substr(2);} 231if(!/^[0-9]{8}$/.test(value)){return false;} 232var sum=0,weight=[7,9,10,5,8,4,2,1];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 233return(sum%11===0);},_fr:function(value){if(/^FR[0-9A-Z]{2}[0-9]{9}$/.test(value)){value=value.substr(2);} 234if(!/^[0-9A-Z]{2}[0-9]{9}$/.test(value)){return false;} 235if(!$.fn.bootstrapValidator.helpers.luhn(value.substr(2))){return false;} 236if(/^[0-9]{2}$/.test(value.substr(0,2))){return value.substr(0,2)===(parseInt(value.substr(2)+'12',10)%97+'');}else{var alphabet='0123456789ABCDEFGHJKLMNPQRSTUVWXYZ',check;if(/^[0-9]{1}$/.test(value.charAt(0))){check=alphabet.indexOf(value.charAt(0))*24+alphabet.indexOf(value.charAt(1))-10;}else{check=alphabet.indexOf(value.charAt(0))*34+alphabet.indexOf(value.charAt(1))-100;} 237return((parseInt(value.substr(2),10)+1+Math.floor(check / 11))%11)===(check%11);}},_gb:function(value){if(/^GB[0-9]{9}$/.test(value)||/^GB[0-9]{12}$/.test(value)||/^GBGD[0-9]{3}$/.test(value)||/^GBHA[0-9]{3}$/.test(value)||/^GB(GD|HA)8888[0-9]{5}$/.test(value)){value=value.substr(2);} 238if(!/^[0-9]{9}$/.test(value)&&!/^[0-9]{12}$/.test(value)&&!/^GD[0-9]{3}$/.test(value)&&!/^HA[0-9]{3}$/.test(value)&&!/^(GD|HA)8888[0-9]{5}$/.test(value)){return false;} 239var length=value.length;if(length===5){var firstTwo=value.substr(0,2),lastThree=parseInt(value.substr(2),10);return('GD'===firstTwo&&lastThree<500)||('HA'===firstTwo&&lastThree>=500);}else if(length===11&&('GD8888'===value.substr(0,6)||'HA8888'===value.substr(0,6))){if(('GD'===value.substr(0,2)&&parseInt(value.substr(6,3),10)>=500)||('HA'===value.substr(0,2)&&parseInt(value.substr(6,3),10)<500)){return false;} 240return(parseInt(value.substr(6,3),10)%97===parseInt(value.substr(9,2),10));}else if(length===9||length===12){var sum=0,weight=[8,7,6,5,4,3,2,10,1];for(var i=0;i<9;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 241sum=sum%97;if(parseInt(value.substr(0,3),10)>=100){return(sum===0||sum===42||sum===55);}else{return(sum===0);}} 242return true;},_gr:function(value){if(/^(GR|EL)[0-9]{9}$/.test(value)){value=value.substr(2);} 243if(!/^[0-9]{9}$/.test(value)){return false;} 244if(value.length===8){value='0'+value;} 245var sum=0,weight=[256,128,64,32,16,8,4,2];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 246sum=(sum%11)%10;return(sum+''===value.substr(8,1));},_el:function(value){return this._gr(value);},_hu:function(value){if(/^HU[0-9]{8}$/.test(value)){value=value.substr(2);} 247if(!/^[0-9]{8}$/.test(value)){return false;} 248var sum=0,weight=[9,7,3,1,9,7,3,1];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 249return(sum%10===0);},_hr:function(value){if(/^HR[0-9]{11}$/.test(value)){value=value.substr(2);} 250if(!/^[0-9]{11}$/.test(value)){return false;} 251return $.fn.bootstrapValidator.helpers.mod11And10(value);},_ie:function(value){if(/^IE[0-9]{1}[0-9A-Z\*\+]{1}[0-9]{5}[A-Z]{1,2}$/.test(value)){value=value.substr(2);} 252if(!/^[0-9]{1}[0-9A-Z\*\+]{1}[0-9]{5}[A-Z]{1,2}$/.test(value)){return false;} 253var getCheckDigit=function(value){while(value.length<7){value='0'+value;} 254var alphabet='WABCDEFGHIJKLMNOPQRSTUV',sum=0;for(var i=0;i<7;i++){sum+=parseInt(value.charAt(i),10)*(8-i);} 255sum+=9*alphabet.indexOf(value.substr(7));return alphabet[sum%23];};if(/^[0-9]+$/.test(value.substr(0,7))){return value.charAt(7)===getCheckDigit(value.substr(0,7)+value.substr(8)+'');}else if('ABCDEFGHIJKLMNOPQRSTUVWXYZ+*'.indexOf(value.charAt(1))!==-1){return value.charAt(7)===getCheckDigit(value.substr(2,5)+value.substr(0,1)+'');} 256return true;},_is:function(value){if(/^IS[0-9]{5,6}$/.test(value)){value=value.substr(2);} 257return/^[0-9]{5,6}$/.test(value);},_it:function(value){if(/^IT[0-9]{11}$/.test(value)){value=value.substr(2);} 258if(!/^[0-9]{11}$/.test(value)){return false;} 259if(parseInt(value.substr(0,7),10)===0){return false;} 260var lastThree=parseInt(value.substr(7,3),10);if((lastThree<1)||(lastThree>201)&&lastThree!==999&&lastThree!==888){return false;} 261return $.fn.bootstrapValidator.helpers.luhn(value);},_lt:function(value){if(/^LT([0-9]{7}1[0-9]{1}|[0-9]{10}1[0-9]{1})$/.test(value)){value=value.substr(2);} 262if(!/^([0-9]{7}1[0-9]{1}|[0-9]{10}1[0-9]{1})$/.test(value)){return false;} 263var length=value.length,sum=0,i;for(i=0;i<length-1;i++){sum+=parseInt(value.charAt(i),10)*(1+i%9);} 264var check=sum%11;if(check===10){sum=0;for(i=0;i<length-1;i++){sum+=parseInt(value.charAt(i),10)*(1+(i+2)%9);}} 265check=check%11%10;return(check+''===value.charAt(length-1));},_lu:function(value){if(/^LU[0-9]{8}$/.test(value)){value=value.substr(2);} 266if(!/^[0-9]{8}$/.test(value)){return false;} 267return((parseInt(value.substr(0,6),10)%89)+''===value.substr(6,2));},_lv:function(value){if(/^LV[0-9]{11}$/.test(value)){value=value.substr(2);} 268if(!/^[0-9]{11}$/.test(value)){return false;} 269var first=parseInt(value.charAt(0),10),sum=0,weight=[],i,length=value.length;if(first>3){sum=0;weight=[9,1,4,8,3,10,2,5,7,6,1];for(i=0;i<length;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 270sum=sum%11;return(sum===3);}else{var day=parseInt(value.substr(0,2),10),month=parseInt(value.substr(2,2),10),year=parseInt(value.substr(4,2),10);year=year+1800+parseInt(value.charAt(6),10)*100;if(!$.fn.bootstrapValidator.helpers.date(year,month,day)){return false;} 271sum=0;weight=[10,5,8,4,2,1,6,3,7,9];for(i=0;i<length-1;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 272sum=(sum+1)%11%10;return(sum+''===value.charAt(length-1));}},_mt:function(value){if(/^MT[0-9]{8}$/.test(value)){value=value.substr(2);} 273if(!/^[0-9]{8}$/.test(value)){return false;} 274var sum=0,weight=[3,4,6,7,8,9,10,1];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 275return(sum%37===0);},_nl:function(value){return/^NL[0-9]{9}B[0-9]{2}$/.test(value);},_no:function(value){if(/^NO[0-9]{9}$/.test(value)){value=value.substr(2);} 276if(!/^[0-9]{9}$/.test(value)){return false;} 277var sum=0,weight=[3,2,7,6,5,4,3,2];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 278sum=11-sum%11;if(sum===11){sum=0;} 279return(sum+''===value.substr(8,1));},_pl:function(value){if(/^PL[0-9]{10}$/.test(value)){value=value.substr(2);} 280if(!/^[0-9]{10}$/.test(value)){return false;} 281var sum=0,weight=[6,5,7,2,3,4,5,6,7,-1];for(var i=0;i<10;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 282return(sum%11===0);},_pt:function(value){if(/^PT[0-9]{9}$/.test(value)){value=value.substr(2);} 283if(!/^[0-9]{9}$/.test(value)){return false;} 284var sum=0,weight=[9,8,7,6,5,4,3,2];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 285sum=11-sum%11;if(sum>9){sum=0;} 286return(sum+''===value.substr(8,1));},_ro:function(value){if(/^RO[1-9][0-9]{1,9}$/.test(value)){value=value.substr(2);} 287if(!/^[1-9][0-9]{1,9}$/.test(value)){return false;} 288var length=value.length,weight=[7,5,3,2,1,7,5,3,2].slice(10-length),sum=0;for(var i=0;i<length-1;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 289sum=(10*sum)%11%10;return(sum+''===value.substr(length-1,1));},_ru:function(value){if(/^RU([0-9]{10}|[0-9]{12})$/.test(value)){value=value.substr(2);} 290if(!/^([0-9]{10}|[0-9]{12})$/.test(value)){return false;} 291var i=0;if(value.length===10){var sum=0,weight=[2,4,10,3,5,9,4,6,8,0];for(i=0;i<10;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 292sum=sum%11;if(sum>9){sum=sum%10;} 293return(sum+''===value.substr(9,1));}else if(value.length===12){var sum1=0,weight1=[7,2,4,10,3,5,9,4,6,8,0],sum2=0,weight2=[3,7,2,4,10,3,5,9,4,6,8,0];for(i=0;i<11;i++){sum1+=parseInt(value.charAt(i),10)*weight1[i];sum2+=parseInt(value.charAt(i),10)*weight2[i];}
294sum1=sum1%11;if(sum1>9){sum1=sum1%10;} 295sum2=sum2%11;if(sum2>9){sum2=sum2%10;} 296return(sum1+''===value.substr(10,1)&&sum2+''===value.substr(11,1));} 297return false;},_rs:function(value){if(/^RS[0-9]{9}$/.test(value)){value=value.substr(2);} 298if(!/^[0-9]{9}$/.test(value)){return false;} 299var sum=10,temp=0;for(var i=0;i<8;i++){temp=(parseInt(value.charAt(i),10)+sum)%10;if(temp===0){temp=10;} 300sum=(2*temp)%11;} 301return((sum+parseInt(value.substr(8,1),10))%10===1);},_se:function(value){if(/^SE[0-9]{10}01$/.test(value)){value=value.substr(2);} 302if(!/^[0-9]{10}01$/.test(value)){return false;} 303value=value.substr(0,10);return $.fn.bootstrapValidator.helpers.luhn(value);},_si:function(value){if(/^SI[0-9]{8}$/.test(value)){value=value.substr(2);} 304if(!/^[0-9]{8}$/.test(value)){return false;} 305var sum=0,weight=[8,7,6,5,4,3,2];for(var i=0;i<7;i++){sum+=parseInt(value.charAt(i),10)*weight[i];} 306sum=11-sum%11;if(sum===10){sum=0;} 307return(sum+''===value.substr(7,1));},_sk:function(value){if(!/^SK.*$/.test(value)){return false;} 308if(/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(value)){value=value.substr(2);} 309if(!/^[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(value)){return false;} 310return(parseInt(value,10)%11===0);},_ve:function(value){if(/^VE[VEJPG][0-9]{9}$/.test(value)){value=value.substr(2);} 311if(!/^[VEJPG][0-9]{9}$/.test(value)){return false;} 312var types={'V':4,'E':8,'J':12,'P':16,'G':20},sum=types[value.charAt(0)],weight=[3,2,7,6,5,4,3,2];for(var i=0;i<8;i++){sum+=parseInt(value.charAt(i+1),10)*weight[i];} 313sum=11-sum%11;if(sum===11||sum===10){sum=0;} 314return(sum+''===value.substr(9,1));},_za:function(value){if(/^ZA4[0-9]{9}$/.test(value)){value=value.substr(2);} 315return/^4[0-9]{9}$/.test(value);},};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.vatSimple=$.extend($.fn.bootstrapValidator.i18n.vatSimple||{},{'default':'Must begin with the country code (two letters) and contain a minimum of two additional characters.',});$.fn.bootstrapValidator.validators.vatSimple={html5Attributes:{message:'message'},validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 316if(/^[A-Za-z]{2}[0-9A-Za-z]{2,}$/.test(value)){return true;} 317return{valid:false,message:$.fn.bootstrapValidator.helpers.format(options.message||$.fn.bootstrapValidator.i18n.vatSimple.default)}}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.zipCode=$.extend($.fn.bootstrapValidator.i18n.zipCode||{},{'default':'Please enter a valid postal code',countryNotSupported:'The country code %s is not supported',country:'Please enter a valid postal code in %s',countries:{AT:'Austria',BR:'Brazil',CA:'Canada',CH:'Switzerland',CZ:'Czech Republic',DE:'Germany',DK:'Denmark',FR:'France',GB:'United Kingdom',HR:'Croatia',IE:'Ireland',IT:'Italy',LI:'Liechtenstein',MA:'Morocco',NL:'Netherlands',PT:'Portugal',RO:'Romania',RU:'Russia',SE:'Sweden',SI:'Slovenian',SG:'Singapore',SK:'Slovakia',US:'USA'}});$.fn.bootstrapValidator.validators.zipCode={html5Attributes:{message:'message',country:'country'},COUNTRY_CODES:['AT','BR','CA','CH','CZ','DE','DK','FR','GB','HR','IE','IT','LI','MA','NL','PT','RO','RU','SE','SI','SG','SK','US','PL'],validate:function(validator,$field,options){var value=$field.val().trim();if(value===''||!options.country){return true;} 318var country=options.country;if(typeof country!=='string'||$.inArray(country,this.COUNTRY_CODES)===-1){country=validator.getDynamicOption($field,country);} 319if(!country||$.inArray(country.toUpperCase(),this.COUNTRY_CODES)===-1){return true;return{valid:false,message:$.fn.bootstrapValidator.helpers.format($.fn.bootstrapValidator.i18n.zipCode.countryNotSupported,country)};} 320var isValid=false;country=country.toUpperCase();switch(country){case'AT':isValid=/^([1-9]{1})(\d{3})$/.test(value);break;case'BR':isValid=/^(\d{2})([\.]?)(\d{3})([\-]?)(\d{3})$/.test(value);break;case'CA':isValid=/^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(value);break;case'CH':isValid=/^([1-9]{1})(\d{3})$/.test(value);break;case'CZ':isValid=/^(\d{3})([ ]?)(\d{2})$/.test(value);break;case'DE':isValid=/^(?!01000|99999)(0[1-9]\d{3}|[1-9]\d{4})$/.test(value);break;case'DK':isValid=/^(DK(-|\s)?)?\d{4}$/i.test(value);break;case'FR':isValid=/^[0-9]{5}$/i.test(value);break;case'GB':isValid=this._gb(value);break;case'HR':isValid=/^(\d{5})$/.test(value);break;case'IE':isValid=/^(D6W|[ACDEFHKNPRTVWXY]\d{2})\s[0-9ACDEFHKNPRTVWXY]{4}$/.test(value);break;case'IT':isValid=/^(I-|IT-)?\d{5}$/i.test(value);break;case'LI':isValid=/^([1-9]{1})(\d{3})$/.test(value);break;case'MA':isValid=/^[1-9][0-9]{4}$/i.test(value);break;case'NL':isValid=/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(value);break;case'PT':isValid=/^[1-9]\d{3}-\d{3}$/.test(value);break;case'RO':isValid=/^(0[1-8]{1}|[1-9]{1}[0-5]{1})[0-9]{4}$/i.test(value);break;case'RU':isValid=/^[0-9]{6}$/i.test(value);break;case'SI':isValid=/^[0-9]{4}$/i.test(value);break;case'SE':isValid=/^(S-)?\d{3}\s?\d{2}$/i.test(value);break;case'SG':isValid=/^([0][1-9]|[1-6][0-9]|[7]([0-3]|[5-9])|[8][0-2])(\d{4})$/i.test(value);break;case'SK':isValid=/^(\d{3})([ ]?)(\d{2})$/.test(value);break;case'PL':isValid=/^[0-9]{2}-[0-9]{3}$/.test(value);break;case'US':default:isValid=/^\d{4,5}([\-]?\d{4})?$/.test(value);break;} 321return{valid:isValid,message:$.fn.bootstrapValidator.helpers.format(
321options.message||$.fn.bootstrapValidator.i18n.zipCode.country,$.fn.bootstrapValidator.i18n.zipCode.countries[country])};},_gb:function(value){var firstChar='[ABCDEFGHIJKLMNOPRSTUWYZ]',secondChar='[ABCDEFGHKLMNOPQRSTUVWXY]',thirdChar='[ABCDEFGHJKPMNRSTUVWXY]',fourthChar='[ABEHMNPRVWXY]',fifthChar='[ABDEFGHJLNPQRSTUWXYZ]',regexps=[new RegExp('^('+firstChar+'{1}'+secondChar+'?[0-9]{1,2})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^('+firstChar+'{1}[0-9]{1}'+thirdChar+'{1})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^('+firstChar+'{1}'+secondChar+'{1}?[0-9]{1}'+fourthChar+'{1})(\\s*)([0-9]{1}'+fifthChar+'{2})$','i'),new RegExp('^(BF1)(\\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$','i'),/^(GIR)(\s*)(0AA)$/i,/^(BFPO)(\s*)([0-9]{1,4})$/i,/^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i,/^([A-Z]{4})(\s*)(1ZZ)$/i,/^(AI-2640)$/i];for(var i=0;i<regexps.length;i++){if(regexps[i].test(value)){return true;}} 322return false;}};}(window.jQuery));;(function($){$.fn.bootstrapValidator.i18n.charset=$.extend($.fn.bootstrapValidator.i18n.charset||{},{default:'ProsÃm použÃvejte pouze latinku'});$.fn.bootstrapValidator.validators.charset={html5Attributes:{encoding:'encoding'},CHARSETS:['windows-1250'],validate:function(validator,$field,options){var value=$field.val();if(value===''){return true;} 323var encoding=options.encoding;if(typeof encoding!=='string'||$.inArray(encoding,this.CHARSETS)===-1){encoding=this.CHARSETS[0];} 324var isValid=true;switch(encoding){case'windows-1250':isValid=/^[A-Za-z0-9 !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~â¬âââ¦â â¡â°Å â¹ÅŤŽŹâââââ¢âââ¢Å¡âºÅťžźËËŤĦ§¨©Å«¬®Ż°±ËÅÂ´ÂµÂ¶Â·Â¸Ä Å»ĽËľżÅÃÃÄÃĹÄÃÄÃÄÃÄÃÃÄÄÅÅÃÃÅÃÃÅÅ®ÃŰÃÃÅ¢ÃÅáâÄäĺÄçÄéÄëÄÃîÄÄÅÅóôÅö÷ÅůúűüýţË]*$/.test( 325 value 326 ); 327 break; 328 } 329 330 return isValid; 331 } 332 }; 333})(window.jQuery); 334;(function($) { 335 $.fn.bootstrapValidator.i18n.iban = $.extend($.fn.bootstrapValidator.i18n.iban || {}, { 336 'default': 'Please enter a valid IBAN number', 337 countryNotSupported: 'The country code %s is not supported', 338 country: 'Please enter a valid IBAN number in %s', 339 countries: { 340 AD: 'Andorra', 341 AE: 'United Arab Emirates', 342 AL: 'Albania', 343 AO: 'Angola', 344 AT: 'Austria', 345 AZ: 'Azerbaijan', 346 BA: 'Bosnia and Herzegovina', 347 BE: 'Belgium', 348 BF: 'Burkina Faso', 349 BG: 'Bulgaria', 350 BH: 'Bahrain', 351 BI: 'Burundi', 352 BJ: 'Benin', 353 BR: 'Brazil', 354 CH: 'Switzerland', 355 CI: 'Ivory Coast', 356 CM: 'Cameroon', 357 CR: 'Costa Rica', 358 CV: 'Cape Verde', 359 CY: 'Cyprus', 360 CZ: 'Czech Republic', 361 DE: 'Germany', 362 DK: 'Denmark', 363 DO: 'Dominican Republic', 364 DZ: 'Algeria', 365 EE: 'Estonia', 366 ES: 'Spain', 367 FI: 'Finland', 368 FO: 'Faroe Islands', 369 FR: 'France', 370 GB: 'United Kingdom', 371 GE: 'Georgia', 372 GI: 'Gibraltar', 373 GL: 'Greenland', 374 GR: 'Greece', 375 GT: 'Guatemala', 376 HR: 'Croatia', 377 HU: 'Hungary', 378 IE: 'Ireland', 379 IL: 'Israel', 380 IR: 'Iran', 381 IS: 'Iceland', 382 IT: 'Italy', 383 JO: 'Jordan', 384 KW: 'Kuwait', 385 KZ: 'Kazakhstan', 386 LB: 'Lebanon', 387 LI: 'Liechtenstein', 388 LT: 'Lithuania', 389 LU: 'Luxembourg', 390 LV: 'Latvia', 391 MC: 'Monaco', 392 MD: 'Moldova', 393 ME: 'Montenegro', 394 MG: 'Madagascar', 395 MK: 'Macedonia', 396 ML: 'Mali', 397 MR: 'Mauritania', 398 MT: 'Malta', 399 MU: 'Mauritius', 400 MZ: 'Mozambique', 401 NL: 'Netherlands', 402 NO: 'Norway', 403 PK: 'Pakistan', 404 PL: 'Poland', 405 PS: 'Palestine', 406 PT: 'Portugal', 407 QA: 'Qatar', 408 RO: 'Romania', 409 RS: 'Serbia', 410 SA: 'Saudi Arabia',
411 SE: 'Sweden', 412 SI: 'Slovenia', 413 SK: 'Slovakia', 414 SM: 'San Marino', 415 SN: 'Senegal', 416 TN: 'Tunisia', 417 TR: 'Turkey', 418 VG: 'Virgin Islands, British' 419 } 420 }); 421 422 $.fn.bootstrapValidator.validators.iban = { 423 html5Attributes: { 424 message: 'message', 425 country: 'country' 426 }, 427 428 // http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf 429 // http://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country 430 REGEX: { 431 AD: 'AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}', // Andorra 432 AE: 'AE[0-9]{2}[0-9]{3}[0-9]{16}', // United Arab Emirates 433 AL: 'AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}', // Albania 434 AO: 'AO[0-9]{2}[0-9]{21}', // Angola 435 AT: 'AT[0-9]{2}[0-9]{5}[0-9]{11}', // Austria 436 AZ: 'AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}', // Azerbaijan 437 BA: 'BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}', // Bosnia and Herzegovina 438 BE: 'BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}', // Belgium 439 BF: 'BF[0-9]{2}[0-9]{23}', // Burkina Faso 440 BG: 'BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}', // Bulgaria 441 BH: 'BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}', // Bahrain 442 BI: 'BI[0-9]{2}[0-9]{12}', // Burundi 443 BJ: 'BJ[0-9]{2}[A-Z]{1}[0-9]{23}', // Benin 444 BR: 'BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]', // Brazil 445 CH: 'CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}', // Switzerland 446 CI: 'CI[0-9]{2}[A-Z]{1}[0-9]{23}', // Ivory Coast 447 CM: 'CM[0-9]{2}[0-9]{23}', // Cameroon 448 CR: 'CR[0-9]{2}[0-9]{3}[0-9]{14}', // Costa Rica 449 CV: 'CV[0-9]{2}[0-9]{21}', // Cape Verde 450 CY: 'CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}', // Cyprus 451 CZ: 'CZ[0-9]{2}[0-9]{20}', // Czech Republic 452 DE: 'DE[0-9]{2}[0-9]{8}[0-9]{10}', // Germany 453 DK: 'DK[0-9]{2}[0-9]{14}', // Denmark 454 DO: 'DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}', // Dominican Republic 455 DZ: 'DZ[0-9]{2}[0-9]{20}', // Algeria 456 EE: 'EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}', // Estonia 457 ES: 'ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}', // Spain 458 FI: 'FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}', // Finland 459 FO: 'FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', // Faroe Islands 460 FR: 'FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', // France 461 GB: 'GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', // United Kingdom 462 GE: 'GE[0-9]{2}[A-Z]{2}[0-9]{16}', // Georgia 463 GI: 'GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}', // Gibraltar 464 GL: 'GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', // Greenland 465 GR: 'GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}', // Greece 466 GT: 'GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}', // Guatemala 467 HR: 'HR[0-9]{2}[0-9]{7}[0-9]{10}', // Croatia 468 HU: 'HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}', // Hungary 469 IE: 'IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', // Ireland 470 IL: 'IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}', // Israel 471 IR: 'IR[0-9]{2}[0-9]{22}', // Iran 472 IS: 'IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}', // Iceland 473 IT: 'IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', // Italy 474 JO: 'JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}', // Jordan 475 KW: 'KW[0-9]{2}[A-Z]{4}[0-9]{22}', // Kuwait 476 KZ: 'KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}', // Kazakhstan 477 LB: 'LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}', // Lebanon 478 LI: 'LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}', // Liechtenstein 479 LT: 'LT[0-9]{2}[0-9]{5}[0-9]{11}', // Lithuania 480 LU: 'LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}', // Luxembourg 481 LV: 'LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}', // Latvia 482 MC: 'MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', // Monaco 483 MD: 'MD[0-9]{2}[A-Z0-9]{20}', // Moldova 484 ME: 'ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Montenegro 485 MG: 'MG[0-9]{2}[0-9]{23}', // Madagascar 486 MK: 'MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}', // Macedonia 487 ML: 'ML[0-9]{2}[A-Z]{1}[0-9]{23}', // Mali 488 MR: 'MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}', // Mauritania 489 MT: 'MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}', // Malta 490 MU: 'MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}', // Mauritius 491 MZ: 'MZ[0-9]{2}[0-9]{21}', // Mozambique 492 NL: 'NL[0-9]{2}[A-Z]{4}[0-9]{10}', // Netherlands 493 NO: 'NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}', // Norway 494 PK: 'PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', // Pakistan 495 PL: 'PL[0-9]{2}[0-9]{8}[0-9]{16}', // Poland 496 PS: 'PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}', // Palestinian 497 PT: 'PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}', // Portugal 498 QA: 'QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}', // Qatar 499 RO: 'RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', // Romania 500 RS: 'RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Serbia 501 SA: 'SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}', // Saudi Arabia 502 SE: 'SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}', // Sweden 503 SI: 'SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}', // Slovenia 504 SK: 'SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}', // Slovakia 505 SM: 'SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', // San Marino 506 SN: 'SN[0-9]{2}[A-Z]{1}[0-9]{23}', // Senegal 507 TN: 'TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Tunisia 508 TR: 'TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}', // Turkey 509 VG: 'VG[0-9]{2}[A-Z]{4}[0-9]{16}' // Virgin Islands, British 510 }, 511 512 /** 513 * Validate an International Bank Account Number (IBAN) 514 * To test it, take the sample IBAN from 515 * http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html 516 * 517 * @param {BootstrapValidator} validator The validator plugin instance 518 * @param {jQuery} $field Field element 519 * @param {Object} options Can consist of the following keys: 520 * - message: The invalid message 521 * - country: The ISO 3166-1 country code. It can be 522 * - A country code 523 * - Name of field which its value defines the country code 524 * - Name of callback function that returns the country code 525 * - A callback function that returns the country code 526 * @returns {Boolean|Object} 527 */
528 validate: function(validator, $field, options) { 529 var value = $field.val(); 530 if (value === '') { 531 return true; 532 } 533 534 value = value.replace(/[^a-zA-Z0-9]/g, '').toUpperCase(); 535 var country = options.country; 536 if (!country) { 537 country = value.substr(0, 2); 538 } else if (typeof country !== 'string' || !this.REGEX[country]) { 539 // Determine the country code 540 country = validator.getDynamicOption($field, country); 541 } 542 543 if (!this.REGEX[country]) { 544 return { 545 valid: false, 546 message: $.fn.bootstrapValidator.helpers.format($.fn.bootstrapValidator.i18n.iban.countryNotSupported, country) 547 }; 548 } 549 550 if (!(new RegExp('^' + this.REGEX[country] + '$')).test(value)) { 551 return { 552 valid: false, 553 message: $.fn.bootstrapValidator.helpers.format(options.message || $.fn.bootstrapValidator.i18n.iban.country, $.fn.bootstrapValidator.i18n.iban.countries[country]) 554 }; 555 } 556 557 value = value.substr(4) + value.substr(0, 4); 558 value = $.map(value.split(''), function(n) { 559 var code = n.charCodeAt(0); 560 return (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0)) 561 // Replace A, B, C, ..., Z with 10, 11, ..., 35 562 ? (code - 'A'.charCodeAt(0) + 10) 563 : n; 564 }); 565 value = value.join(''); 566 567 var temp = parseInt(value.substr(0, 1), 10), 568 length = value.length; 569 for (var i = 1; i < length; ++i) { 570 temp = (temp * 10 + parseInt(value.substr(i, 1), 10)) % 97; 571 } 572 573 return { 574 valid: (temp === 1), 575 message: $.fn.bootstrapValidator.helpers.format(options.message || $.fn.bootstrapValidator.i18n.iban.country, $.fn.bootstrapValidator.i18n.iban.countries[country]) 576 }; 577 } 578 }; 579}(window.jQuery)); 580;(function($) { 581 $.fn.bootstrapValidator.i18n.greaterThan = $.extend($.fn.bootstrapValidator.i18n.greaterThan || {}, { 582 'default': 'Please enter a value greater than or equal to %s', 583 notInclusive: 'Please enter a value greater than %s' 584 }); 585 586 $.fn.bootstrapValidator.validators.greaterThan = { 587 html5Attributes: { 588 message: 'message', 589 value: 'value', 590 inclusive: 'inclusive' 591 }, 592 593 enableByHtml5: function($field) { 594 var type = $field.attr('type'), 595 min = $field.attr('min'); 596 if (min && type !== 'date') { 597 return { 598 value: min 599 }; 600 } 601 602 return false; 603 }, 604 605 /** 606 * Return true if the input value is greater than or equals to given number 607 * 608 * @param {BootstrapValidator} validator Validate plugin instance 609 * @param {jQuery} $field Field element 610 * @param {Object} options Can consist of the following keys: 611 * - value: Define the number to compare with. It can be 612 * - A number 613 * - Name of field which its value defines the number 614 * - Name of callback function that returns the number 615 * - A callback function that returns the number 616 * 617 * - inclusive [optional]: Can be true or false. Default is true 618 * - message: The invalid message 619 * @returns {Boolean|Object} 620 */ 621 validate: function(validator, $field, options) { 622 var value = $field.val(); 623 if (value === '') { 624 return true; 625 } 626 627 value = this._format(value); 628 if (!$.isNumeric(value)) { 629 return false; 630 } 631 632 var compareTo = $.isNumeric(options.value) ? options.value : validator.getDynamicOption($field, options.value), 633 compareToValue = this._format(compareTo); 634 635 value = parseFloat(value); 636 return (options.inclusive === true || options.inclusive === undefined) 637 ? { 638 valid: value >= compareToValue, 639 message: $.fn.bootstrapValidator.helpers.format(
639options.message || $.fn.bootstrapValidator.i18n.greaterThan['default'], compareTo) 640 } 641 : { 642 valid: value > compareToValue, 643 message: $.fn.bootstrapValidator.helpers.format(options.message || $.fn.bootstrapValidator.i18n.greaterThan.notInclusive, compareTo) 644 }; 645 }, 646 647 _format: function(value) { 648 return (value + '').replace(',', '.'); 649 } 650 }; 651}(window.jQuery)); 652;(function($) { 653 $.fn.bootstrapValidator.i18n.bankAccount = $.extend($.fn.bootstrapValidator.i18n.bankAccount || {}, { 654 'default': 'Please enter valid IBAN' 655 }); 656 657 $.fn.bootstrapValidator.validators.bankAccount = { 658 /** 659 * Return true if the input value is a czech bank number or IBAN. 660 * 661 * @param {BootstrapValidator} validator The validator plugin instance 662 * @param {jQuery} $field Field element 663 * @param {Object} options Can consist of the following keys: 664 * - message: The invalid message 665 * @returns {Boolean} 666 */ 667 validate: function(validator, $field, options) { 668 var value = $field.val(); 669 var ibanValidator = $.fn.bootstrapValidator.validators.iban; 670 if(ibanValidator.validate(validator, $field, options).valid || this.checkBankAccountNumber(value) || value === "") { 671 return true; 672 } 673 return false; 674 }, 675 checkBankAccountNumber: function(account) { 676 var matches = /^(([0-9]{0,6})-)?([0-9]{1,10})\/([0-9]{4,6})$/.exec(account); 677 if (!matches) { 678 return false; 679 } 680 if (matches[2]) { 681 return this.checkDigit11(matches[2]) && this.checkDigit11(matches[3]); 682 } else { 683 return this.checkDigit11(matches[3]); 684 } 685 }, 686 checkDigit11: function(n, x) { 687 var l = n.length - 1, i = 0, v = 0; 688 var weights = [1, 2, 4, 8, 5, 10, 9, 7, 3, 6]; 689 690 for (i = 0; i <= l; i++) { 691 v += parseInt(n[l - i], 10) * weights[i]; 692 } 693 return v % 11 == 0; 694 } 695 }; 696}(window.jQuery)); 697 698(function($){$.fn.bootstrapValidator.i18n=$.extend(true,$.fn.bootstrapValidator.i18n,{bankAccount:{default:"ProsÃm, zadejte správné ÄÃslo úÄtu nebo IBAN"},base64:{default:'ProsÃm, zadejte správný base64'},between:{default:'ProsÃm, zadejte hodnotu mezi %s a %s',notInclusive:'ProsÃm, zadejte hodnotu mezi %s a %s (vÄetnÄ tÄchto ÄÃsel)'},callback:{default:'ProsÃm, zadejte správnou hodnotu'},choice:{default:'ProsÃm, vyberte správnou hodnotu',less:'Hodnota musà být minimálnÄ %s',more:'Hodnota nesmà být vÃce jak %s',between:'ProsÃm, vyberte mezi %s a %s'},color:{default:'ProsÃm, zadejte správnou barvu'},creditCard:{default:'ProsÃm, zadejte správné ÄÃslo kreditnà karty'},cusip:{default:'ProsÃm, zadejte správné CUSIP ÄÃslo'},cvv:{default:'ProsÃm, zadejte správné CVV ÄÃslo'},date:{default:'ProsÃm, zadejte správné datum',min:'ProsÃm, zadejte datum pÅed %s',max:'ProsÃm, zadejte datum po %s',range:'ProsÃm, zadejte datum v rozmezà %s až %s'},different:{default:'ProsÃm, zadejte jinou hodnotu'},digits:{default:'Toto pole může obsahovat pouze ÄÃsla'},ean:{default:'ProsÃm, zadejte správné EAN ÄÃslo'},emailAddress:{default:'Zadejte platnou e-mailovou adresu'},file:{default:'ProsÃm, vyberte soubor'},greaterThan:{default:'ProsÃm, zadejte hodnotu vÄtšà nebo rovnu %s',notInclusive:'ProsÃm, zadejte hodnotu vÄtšà než %s'},grid:{default:'ProsÃm, zadejte správné GRId ÄÃslo'},hex:{default:'ProsÃm, zadejte správné hexadecimálnà ÄÃslo'},hexColor:{default:'ProsÃm, zadejte správnou hex barvu'},iban:{default:'ProsÃm, zadejte správné IBAN ÄÃslo',countryNotSupported:'IBAN pro %s nenà podporován',country:'ProsÃm, zadejte správné IBAN ÄÃslo pro %s',countries:{AD:'Andorru',AE:'Spojené arabské emiráty',AL:'Albanii',AO:'Angolu',AT:'Rakousko',AZ:'Ãzerbajdžán',BA:'Bosnu a Herzegovinu',BE:'Belgie',BF:'Burkina Faso',BG:'Bulharsko',BH:'Bahrajn',BI:'Burundi',BJ:'Benin',BR:'BrazÃlii',CH:'Å výcarsko',CI:'PobÅežà slonoviny',CM:'Kamerun',CR:'Kostariku',CV:'Cape Verde',CY:'Kypr',CZ:'Äeskou republiku',DE:'NÄmecko',DK:'Dánsko',DO:'Dominikánskou republiku',DZ:'AlžÃrsko',EE:'Estonsko',ES:'Å panÄlsko',FI:'Finsko',FO:'Faerské ostrovy',FR:'Francie',GB:'Velkou Británii',GE:'Gruzii',GI:'Gibraltar',GL:'Grónsko',GR:'Åecko',GT:'Guatemala',HR:'Chorvatsko',HU:'MaÄarsko',IE:'Irsko',IL:'Israel',IR:'Irán',IS:'Island',IT:'Itálii',JO:'Jordansko',KW:'Kuwait',KZ:'Kazakhstán',LB:'Lebanon',LI:'LichtenÅ¡tejnsko',LT:'Litvu',LU:'Lucembursko',LV:'LotyÅ¡sko',MC:'Monaco',MD:'Moldavsko',ME:'Äernou Horu',MG:'Madagaskar',MK:'Makedonii',ML:'Mali',MR:'Mauritánii',MT:'Malta',MU:'Mauritius',MZ:'Mosambik',NL:'Nizozemsko',NO:'Norsko',PK:'Pakistán',PL:'Polsko',PS:'Palestinu',PT:'Portugalsko',QA:'Katar',RO:'Rumunsko',RS:'Srbsko',SA:'Saudskou Arábii',SE:'Å védsko',SI:'Slovinsko',SK:'Slovensko',SM:'San Marino',SN:'Senegal',TN:'Tunisko',TR:'Turecko',VG:'Britské Panenské ostrovy'}},id:{default:'ProsÃm, zadejte správné rodné ÄÃslo',countryNotSupported:'Rodné ÄÃslo pro %s nenà podporované',country:'ProsÃm, zadejte správné rodné ÄÃslo pro %s',countries:{BA:'Bosnu a Hercegovinu',BG:'Bulharsko',BR:'BrazÃlii',CH:'Å výcarsko',CL:'Chile',CN:'ÄÃna',CZ:'Äeskou Republiku',DK:'Dánsko',EE:'Estonsko',ES:'Å paÅelsko',FI:'Finsko',HR:'Chorvatsko',IE:'Irsko',IS:'Island',LT:'Litvu',LV:'LotyÅ¡sko',ME:'Montenegro',MK:'Makedonii',NL:'NizozemÃ',RO:'Rumunsko',RS:'Srbsko',SE:'Å védsko',SI:'Slovinsko',SK:'Slovensko',SM:'San Marino',TH:'Thajsko',ZA:'Jižnà Afriku'}},identical:{default:'ProsÃm, zadejte stejnou hodnotu'},imei:{default:'ProsÃm, zadejte správné IMEI ÄÃslo'},imo:{default:'ProsÃm, zadejte správné IMO ÄÃslo'},integer:{default:'ProsÃm, zadejte celé ÄÃslo'},ip:{default:'ProsÃm, zadejte správnou IP adresu',ipv4:'ProsÃm, zadejte správnou IPv4 adresu',ipv6:'ProsÃm, zadejte správnou IPv6 adresu'},isbn:{default:'ProsÃm, zadejte správné ISBN ÄÃslo'},isin:{default:'ProsÃm, zadejte správné ISIN ÄÃslo'},ismn:{default:'ProsÃm, zadejte správné ISMN ÄÃslo'},issn:{default:'ProsÃm, zadejte správné ISSN ÄÃslo'},lessThan:{default:'ProsÃm, zadejte hodnotu menšà nebo rovno %s',notInclusive:'ProsÃm, zadejte hodnotu menÄà než %s'},mac:{default:'ProsÃm, zadejte správnou MAC adresu'},meid:{default:'ProsÃm, zadejte správné MEID ÄÃslo'},notEmpty:{default:'Toto pole nesmà být prázdné'},numeric:{default:'ProsÃm, zadejte ÄÃselnou hodnotu'},phone:{default:'ProsÃm, zadejte platné telefonà ÄÃslo',countryNotSupported:'Telefonnà ÄÃslo pro %s nenà podporované',country:'ProsÃm, zadejte platné telefonà ÄÃslo',phoneValidationWarning:'Jste si jistà správnostà telefonnÃho ÄÃsla?',countries:{BR:'BrazÃlii',CN:'ÄÃna',CZ:'Äeskou Republiku',DE:'NÄmecko',DK:'Dánsko',ES:'Å panÄlsko',FR:'Francie',GB:'Velkou Británii',MA:'Maroko',PK:'Pákistán',RO:'Rumunsko',RU:'Rusko',SK:'Slovensko',TH:'Thajsko',US:'Spojené Státy Americké',VE:'Venezuelský'}},regexp:{default:'ProsÃm, zadejte hodnotu splÅujÃcà zadánÃ'},remote:{default:'ProsÃm, zadejte správnou hodnotu'},rtn:{default:'ProsÃm, zadejte správné RTN ÄÃslo'},sedol:{default:'ProsÃm, zadejte správné SEDOL ÄÃslo'},siren:{default:'ProsÃm, zadejte správné SIREN ÄÃslo'},siret:{default:'ProsÃm, zadejte správné SIRET ÄÃslo'},step:{default:'ProsÃm, zadejte správný krok %s'},stringCase:{default:'Pouze malá pÃsmen jsou povoleny v tomto poli',upper:'Pouze velké pÃsmena jsou povoleny v tomto poli'},stringLength:{default:'Toto pole nesmà být prázdné',less:'ProsÃm, zadejte m
698énÄ než %s znaků',more:'ProsÃm, zadejte alespoÅ %s znaků',more_than_two:'ProsÃm, zadejte alespoÅ %s znaky',between:'ProsÃm, zadejte mezi %s a %s znaky'},uri:{default:'ProsÃm, zadejte správnou URI'},uuid:{default:'ProsÃm, zadejte správné UUID ÄÃslo',version:'ProsÃm, zadejte správné UUID verze %s'},vat:{default:'ProsÃm, zadejte platné DIÄ',countryNotSupported:'DIÄ pro %s nenà podporované',country:'ProsÃm, zadejte DIÄ platné pro %s',countries:{AT:'Rakousko',BE:'Belgii',BG:'Bulharsko',BR:'BrazÃlii',CH:'Å výcarsko',CY:'Kypr',CZ:'ÄR',DE:'NÄmecko',DK:'Dánsko',EE:'Estonsko',ES:'Å paÅelsko',FI:'Finsko',FR:'Francie',GB:'Velkou Británii',GR:'Åecko',EL:'Åecko',HU:'MaÄarsko',HR:'Chorvatsko',IE:'Irsko',IS:'Island',IT:'Itálie',LT:'Litvu',LU:'Lucembursko',LV:'LotyÅ¡sko',MT:'Maltu',NL:'NizozemÃ',NO:'Norsko',PL:'Polsko',PT:'Portugalsko',RO:'Rumunsko',RU:'Rusko',RS:'Srbsko',SE:'Å védsko',SI:'Slovinsko',SK:'Slovensko',VE:'Venezuelský',ZA:'Jižnà Afriku'}},vatSimple:{default:'Musà zaÄÃnat kódem státu (dvÄma pÃsmeny) a obsahovat min. dalšà dva znaky.'},vin:{default:'ProsÃm, zadejte správné VIN ÄÃslo'},zipCode:{default:'ProsÃm, zadejte platné PSÄ',countryNotSupported:'%s nenà podporované',country:'ProsÃm, zadejte platné PSÄ',countries:{AT:'Rakousko',BR:'BrazÃlie',CA:'Kanada',CH:'Å výcarsko',CZ:'Äeskou Republiku',DE:'NÄmecko',DK:'Dánsko',FR:'Francie',GB:'Velkou Británii',IE:'Irsko',IT:'Itálie',MA:'Maroko',NL:'NizozemÃ',PT:'Portugalsko',RO:'Rumunsko',RU:'Rusko',SE:'Å védsko',SG:'Singapur',SK:'Slovensko',US:'Spojené Státy Americké'}}});})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.