if(typeof jQuery==='undefined'){throw new Error('BootstrapValidator\'s JavaScript requires 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='',a[0]){} return 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={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=$('