diff --git a/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.dll b/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.dll
index c79d59f..097ff20 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.dll and b/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.dll differ
diff --git a/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.pdb b/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.pdb
index cb7284a..9bbff76 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.pdb and b/SampleServerApp/SampleApp/SampleApp/bin/SampleApp.pdb differ
diff --git a/SampleServerApp/SampleApp/SampleApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SampleServerApp/SampleApp/SampleApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index d90c76e..c347fcd 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/SampleServerApp/SampleApp/SampleApp/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.csprojResolveAssemblyReference.cache b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.csprojResolveAssemblyReference.cache
index 63ac686..3df1159 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.csprojResolveAssemblyReference.cache and b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.csprojResolveAssemblyReference.cache differ
diff --git a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.dll b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.dll
index c79d59f..097ff20 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.dll and b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.dll differ
diff --git a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.pdb b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.pdb
index cb7284a..9bbff76 100644
Binary files a/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.pdb and b/SampleServerApp/SampleApp/SampleApp/obj/Debug/SampleApp.pdb differ
diff --git a/project.sln.DotSettings.user b/project.sln.DotSettings.user
index b76beb5..5e935fa 100644
--- a/project.sln.DotSettings.user
+++ b/project.sln.DotSettings.user
@@ -1,5 +1,5 @@
True
- (Doc Ln 149 Col 44)
+ (Doc Ln 153 Col 44)
4C2EABB3-1A97-4385-88DF-1E94436C128E/d:src/d:Content/d:Scripts/f:jquery.server-validate.js
NumberedBookmarkManager
\ No newline at end of file
diff --git a/src/Content/Scripts/jquery.server-validate.js b/src/Content/Scripts/jquery.server-validate.js
index 4c02656..f710b94 100644
--- a/src/Content/Scripts/jquery.server-validate.js
+++ b/src/Content/Scripts/jquery.server-validate.js
@@ -90,7 +90,7 @@
};
// The actual plugin constructor
- function plugin($divElement) {
+ function plugin($divElement, settings, additionalFields) {
///
/// Process the div element and
///
@@ -98,12 +98,15 @@
///
this.$element = $divElement;
this._name = pluginName;
+ this.settings = settings;
+ this.additionalFields = additionalFields;
+
this.init($divElement);
}
- function processAdditionalFields($elementContainer) {
+ function processAdditionalFields($elementContainer, additionalFields) {
var addFields = [];
- var selectors = window.settings.selectors.additionalFields;
+ var selectors = additionalFields;
for (var i = 0; i < selectors.length; i++) {
var selector = selectors[i];
var $element = $elementContainer.find(selector);
@@ -123,6 +126,7 @@
// Avoid Plugin.prototype conflicts
$.extend(plugin.prototype, {
isDebugging: false,
+ additionalFields : [],
isEmpty: function (variable) {
return variable === null || variable === undefined || variable.length === 0;
},
@@ -132,7 +136,7 @@
}
},
getSettings: function () {
- return window.settings;
+ return this.settings;
},
isMultipleRequestAllowed: function () {
return this.getSettings().multipleRequests;
@@ -286,7 +290,7 @@
}
},
concatAdditionalFields: function ($input) {
- var addFields = window.additionalFields.slice();
+ var addFields = this.additionalFields.slice();
var fields = {
name: $input.attr("name"),
value: $input.val()
@@ -700,18 +704,20 @@
///
var $elementContainer = this;
$selfContainer = this;
+ var settings;
+ var additionalFields;
if ($elementContainer.isInit !== true) {
- window.settings = $.extend({}, defaults, options);
- var selectors = window.settings.selectors;
- window.$divContainers = $elementContainer.find(selectors.divContainer);
- window.additionalFields = processAdditionalFields($elementContainer);
+ settings = $.extend({}, defaults, options);
+ var selectors = settings.selectors;
+ $divContainers = $elementContainer.find(selectors.divContainer);
+ additionalFields = processAdditionalFields($elementContainer, selectors.additionalFields);
}
- var $containers = window.$divContainers;
+ var $containers = $divContainers;
for (var i = 0; i < $containers.length; i++) {
var $divElement = $($containers[i]);
- new plugin($divElement, options);
+ new plugin($divElement, settings, additionalFields);
}
};
diff --git a/src/Content/Scripts/jquery.server-validate.min.js b/src/Content/Scripts/jquery.server-validate.min.js
index 7e916b6..59dc038 100644
--- a/src/Content/Scripts/jquery.server-validate.min.js
+++ b/src/Content/Scripts/jquery.server-validate.min.js
@@ -1,2 +1,2 @@
-(function(n,t,i,r){"use strict";function u(n){this.$element=n;this._name=f;this.init(n)}function s(n){for(var e,i,u=[],f=t.settings.selectors.additionalFields,r=0;r0){var o=i.attr("name"),s=i.attr("value"),h={name:o,value:s};u.push(h)}return u}if(typeof jQuery=="undefined")throw new Error("serverValidate requires jQuery");if(typeof jQuery.validator=="undefined")throw new Error("serverValidate requires jQuery validation plugin & jquery.validate.unobtrusive plugin.");var f="serverValidate",e=null,o={crossDomain:!0,multipleRequests:!0,checkValidationBeforeSendingRequest:!0,dontSendSameRequestTwice:!0,disableInputOnValidation:!0,focusPersistIfNotValid:!0,hideOnValidation:!1,messages:{requesting:"Requesting data..."},selectors:{divContainer:".form-row",validatorContainer:".validator-container",validator:".validator",additionalFields:["[name=__RequestVerificationToken]"]},attributes:{url:"data-url",isValidate:"data-is-validate",submitMethod:"data-submit-method"},icons:{invalid:"validation-icon-invalid fa fa-times",valid:"validation-icon-valid fa fa-check",spinner:"validation-icon-spinner fa fa-refresh fa-spin-custom",error:"validation-icon-error fa fa-exclamation-circle"},iconsIdPrefixes:{invalid:"invalid-mark-",valid:"valid-mark-",spinner:"validation-spinner-",error:"validation-error-"},response:{message:"Field is valid.",isValid:!0,isError:!1,errorCode:null,errorMessage:null},events:{iconCreated:function(){},sameRequestTwice:function(){},beforeSendingRequest:function(){},responseReceived:function(){},responseProcessed:function(){},invalidBefore:function(){},invalidAfter:function(){},validBefore:function(){},validAfter:function(){},onError:function(){}}};n.extend(u.prototype,{isDebugging:!1,isEmpty:function(n){return n===null||n===r||n.length===0},init:function(n){this.isValidForProcessing(n)&&this.processDiv(n)},getSettings:function(){return t.settings},isMultipleRequestAllowed:function(){return this.getSettings().multipleRequests},isDisableInputOnValidation:function(){return this.getSettings().disableInputOnValidation},isInputValidationRequirestoSendRequest:function(){return this.getSettings().checkValidationBeforeSendingRequest},dontSendSameRequestTwice:function(){return this.getSettings().dontSendSameRequestTwice},getAttributes:function(){return this.getSettings().attributes},getEvents:function(){return this.getSettings().events},getIcons:function(){return this.getSettings().icons},getIdPrefixes:function(){return this.getSettings().iconsIdPrefixes},getSelectors:function(){return this.getSettings().selectors},getMessages:function(){return this.getSettings().messages},isValidForProcessing:function(n){var t=this.getAttributes();return n.attr(t.isValidate)==="true"},getInput:function(){if(this.isEmpty(this.$input)){var n=this.$element;this.$input=n.find("input")}return this.$input},getUrl:function(){var n=this.getAttributes(),t=this.getInput();return t.attr(n.url)},processDiv:function(n){var t=this.getInput(n),i=this.getUrl();this.inputProcessWithBlurEvent(n,t,i)},test:function(){this.showSpinner($input)},setCurrentTextForNexttimeChecking:function(n){n.attr("data-previous-submit",n.val())},isPreviousRequestIsSame:function(n,t,i){var u=t.attr("data-previous-submit"),r=u===t.val(),e=this.getSettings(),f=e.events;return this.isDebugging&&console.log("Request is same : "+r),r&&(this.isEmpty(f.sameRequestTwice)||f.sameRequestTwice(n,t,i,u)),r},inputProcessWithBlurEvent:function(n,t,i){var r=this,f=this.getSettings(),u=!0;t.on("blur",function(f){r.blurEvent(f,n,r,t,i);u=!0});t.on("keypress",function(){u===!0&&(n.removeAttr("data-icon-added"),r.hideInvalidIcon(t),r.hideSpinner(t),r.hideErrorIcon(t),r.hideErrorIcon(t),r.hideValidIcon(t),u=!1)})},blurEvent:function(n,t,i,r,u){var e=!i.isInProcessingMode(t)||i.isMultipleRequestAllowed(),f,s,o,h;e&&(f=r,s=i.dontSendSameRequestTwice()&&!i.isPreviousRequestIsSame(t,f,u),e=s||!i.dontSendSameRequestTwice(),e&&(o=i.isInputValidationRequirestoSendRequest(),e=o&&f.valid()||!o,e&&(h=i.concatAdditionalFields(f),i.sendRequest(t,f,u,h)),i.getSettings().focusPersistIfNotValid&&i.focusIfnotValid(f)))},focusIfnotValid:function(n,t){if(t===!0){n.focus();return}n.valid()===!1&&n.focus()},concatAdditionalFields:function(n){var i=t.additionalFields.slice(),r={name:n.attr("name"),value:n.val()};return i.push(r),i},getSubmitMethod:function(n){var t=this.getSettings().attributes;return n.attr(t.submitMethod)},abortPreviousAjaxRequest:function(n){this.showSpinner(n);this.hideInvalidIcon(n);this.hideErrorIcon(n);this.hideErrorIcon(n);this.hideValidIcon(n);this.isEmpty(this.ajaxRequest)||this.ajaxRequest.abort()},sendRequest:function(n,t,i,r){var e=this.getSubmitMethod(t),u=this,o=u.isDebugging,f=u.getSettings().events;this.isEmpty(f.beforeSendingRequest)||f.beforeSendingRequest(n,t,i,r);n.attr("data-icon-added","true");this.abortPreviousAjaxRequest(t);u.markAsProcessing(n,!0);u.setCurrentTextForNexttimeChecking(t);this.ajaxRequest=jQuery.ajax({method:e,url:i,data:r,crossDomain:!0,dataType:"JSON"}).done(function(i){o&&console.log(i);u.markAsProcessing(n,!1);u.processResponse(t,i);u.hideSpinner(t)}).fail(function(r,f,e){u.hideSpinner(t);u.errorProcess(n,t,r,f,e,i);console.log("Request failed: "+e+". Url : "+i)})},errorProcess:function(n,t,i,r,u,f){var e=i.status,o=this.getSettings(),s=o.events,h="";if(e===0&&(e=404,r="Requested url doesn't lead to a valid request."),h="Code "+e+" : "+r,this.showErrorIcon(t,h),o.focusPersistIfNotValid&&this.focusIfnotValid(t,!0),!this.isEmpty(s.onError))s.onError(n,t,i,r,u,f)},markAsProcessing:function(n,t){this.isDebugging&&console.log("Making: "+t);n.attr("data-is-processing",t)},isInProcessingMode:function(n){var t=n.attr("data-is-processing");return this.isDebugging&&console.log("is Processing: "+t),t==="true"},getInputNameOrId:function(n){var t=n.attr("id");return this.isEmpty(t)&&(t=n.attr("name")),t},setMessageOnIcons:function(n,t){var i=n.find("a").attr("title",t).attr("data-original-title",t).find("span");i.attr("title",t).attr("data-display",t)},createIcons:function(t,i,r,u){var h=this.getInputNameOrId(t),c=this.getValidator(),l=this.$element,a=this.getSettings(),o=a.events,s=this.getWrapperPrefix(),f=u+h,v="<\/span><\/a><\/div>",e;return c.append(v),e=n.byId(s+f),n.byId(f).tooltip(),this.isEmpty(o.iconCreated)||o.iconCreated(l,t,e),e},getWrapperPrefix:function(){return"wrapper-"},getValidator:function(){if(this.isEmpty(this.$validator)){var n=this.getSelectors();this.$validator=this.$element.find(n.validator)}return this.$validator},getCachedIcon:function(n,t){var r=this.getIdPrefixes(),s=this.getWrapperPrefix()+t+this.getInputNameOrId(n),e="$"+s,u=this[e];if(this.isEmpty(u)){var h=this.getMessages(),o="",f=this.getIcons(),i="";t===r.spinner?(i=f.spinner,o=h.requesting):t===r.valid?i=f.valid:t===r.invalid?i=f.invalid:t===r.error&&(i=f.error);u=this.createIcons(n,i,o,t);this[e]=u}return u},getInvalidIcon:function(n){if(this.isEmpty(this.$invalidMarkIcon)){var t=this.getIdPrefixes();this.$invalidMarkIcon=this.getCachedIcon(n,t.invalid)}return this.$invalidMarkIcon},getValidIcon:function(n){if(this.isEmpty(this.$validMarkIcon)){var t=this.getIdPrefixes();this.$validMarkIcon=this.getCachedIcon(n,t.valid)}return this.$validMarkIcon},getSpinner:function(n){if(this.isEmpty(this.$spinner)){var t=this.getIdPrefixes();this.$spinner=this.getCachedIcon(n,t.spinner)}return this.$spinner},getErrorIcon:function(n){if(this.isEmpty(this.$errorIcon)){var t=this.getIdPrefixes();this.$errorIcon=this.getCachedIcon(n,t.error)}return this.$errorIcon},showErrorIcon:function(n,t){var i=this.getErrorIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},showSpinner:function(n){var t=this.getSpinner(n);this.animateOn(t)},showInvalidIcon:function(n,t){var i=this.getInvalidIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},showValidIcon:function(n,t){var i=this.getValidIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},hideValidIcon:function(n){var t=this.getValidIcon(n);this.animateOff(t)},hideErrorIcon:function(n){var t=this.getErrorIcon(n);this.animateOff(t)},hideInvalidIcon:function(n){var t=this.getInvalidIcon(n);this.animateOff(t)},hideSpinner:function(n){var t=this.getSpinner(n);this.animateOff(t)},animateOn:function(n){n.fadeIn("slow")},animateOff:function(n){n.hide()},processResponse:function(t,i){var u=this,f=this.$element,e=this.getSettings(),r=e.events,o;this.isEmpty(r.responseReceived)||r.responseReceived(f,t,i);o=e.response;i=n.extend({},o,i);i.isValid?u.validResponse(t,i):u.inValidResponse(t,i);this.isEmpty(r.responseProcessed)||r.responseProcessed(f,t,i)},validResponse:function(n,t){var e=this.isDisableInputOnValidation(),r=this.getSettings().events,o=this.getSettings(),i=this.$element,u=!0,f=t.message;this.isEmpty(r.validBefore)||r.validBefore(i,n,t);this.showValidIcon(n,t.message);e&&n.attr("disabled","disabled");i.attr("data-server-validated",u).attr("data-message",f);n.attr("data-server-validated",u).attr("data-message",f);o.hideOnValidation&&(i.attr("data-is-hidden",u),i.hide("slow"));this.isEmpty(r.validAfter)||r.validAfter(i,n,t)},inValidResponse:function(n,t){var u=this.getSettings(),i=u.events,r=this.$element,f=!1,e=t.message;this.isEmpty(i.invalidBefore)||i.invalidBefore(r,n,t);this.showInvalidIcon(n,t.errorCode+" : "+t.errorMessage);r.attr("data-server-validated",f).attr("data-message",e);n.attr("data-server-validated",f).attr("data-message",e);u.focusPersistIfNotValid&&this.focusIfnotValid(n,!0);this.isEmpty(i.invalidAfter)||i.invalidAfter(r,n,t)}});n.fn.serverValidate=function(i){var f=this,c,h,r,l;for(e=this,f.isInit!==!0&&(t.settings=n.extend({},o,i),c=t.settings.selectors,t.$divContainers=f.find(c.divContainer),t.additionalFields=s(f)),h=t.$divContainers,r=0;r0){var o=i.attr("name"),s=i.attr("value"),h={name:o,value:s};u.push(h)}return u}if(typeof jQuery=="undefined")throw new Error("serverValidate requires jQuery");if(typeof jQuery.validator=="undefined")throw new Error("serverValidate requires jQuery validation plugin & jquery.validate.unobtrusive plugin.");var e="serverValidate",u,o=null,s={crossDomain:!0,multipleRequests:!0,checkValidationBeforeSendingRequest:!0,dontSendSameRequestTwice:!0,disableInputOnValidation:!0,focusPersistIfNotValid:!0,hideOnValidation:!1,messages:{requesting:"Requesting data..."},selectors:{divContainer:".form-row",validatorContainer:".validator-container",validator:".validator",additionalFields:["[name=__RequestVerificationToken]"]},attributes:{url:"data-url",isValidate:"data-is-validate",submitMethod:"data-submit-method"},icons:{invalid:"validation-icon-invalid fa fa-times",valid:"validation-icon-valid fa fa-check",spinner:"validation-icon-spinner fa fa-refresh fa-spin-custom",error:"validation-icon-error fa fa-exclamation-circle"},iconsIdPrefixes:{invalid:"invalid-mark-",valid:"valid-mark-",spinner:"validation-spinner-",error:"validation-error-"},response:{message:"Field is valid.",isValid:!0,isError:!1,errorCode:null,errorMessage:null},events:{iconCreated:function(){},sameRequestTwice:function(){},beforeSendingRequest:function(){},responseReceived:function(){},responseProcessed:function(){},invalidBefore:function(){},invalidAfter:function(){},validBefore:function(){},validAfter:function(){},onError:function(){}}};n.extend(f.prototype,{isDebugging:!1,additionalFields:[],isEmpty:function(n){return n===null||n===r||n.length===0},init:function(n){this.isValidForProcessing(n)&&this.processDiv(n)},getSettings:function(){return this.settings},isMultipleRequestAllowed:function(){return this.getSettings().multipleRequests},isDisableInputOnValidation:function(){return this.getSettings().disableInputOnValidation},isInputValidationRequirestoSendRequest:function(){return this.getSettings().checkValidationBeforeSendingRequest},dontSendSameRequestTwice:function(){return this.getSettings().dontSendSameRequestTwice},getAttributes:function(){return this.getSettings().attributes},getEvents:function(){return this.getSettings().events},getIcons:function(){return this.getSettings().icons},getIdPrefixes:function(){return this.getSettings().iconsIdPrefixes},getSelectors:function(){return this.getSettings().selectors},getMessages:function(){return this.getSettings().messages},isValidForProcessing:function(n){var t=this.getAttributes();return n.attr(t.isValidate)==="true"},getInput:function(){if(this.isEmpty(this.$input)){var n=this.$element;this.$input=n.find("input")}return this.$input},getUrl:function(){var n=this.getAttributes(),t=this.getInput();return t.attr(n.url)},processDiv:function(n){var t=this.getInput(n),i=this.getUrl();this.inputProcessWithBlurEvent(n,t,i)},test:function(){this.showSpinner($input)},setCurrentTextForNexttimeChecking:function(n){n.attr("data-previous-submit",n.val())},isPreviousRequestIsSame:function(n,t,i){var u=t.attr("data-previous-submit"),r=u===t.val(),e=this.getSettings(),f=e.events;return this.isDebugging&&console.log("Request is same : "+r),r&&(this.isEmpty(f.sameRequestTwice)||f.sameRequestTwice(n,t,i,u)),r},inputProcessWithBlurEvent:function(n,t,i){var r=this,f=this.getSettings(),u=!0;t.on("blur",function(f){r.blurEvent(f,n,r,t,i);u=!0});t.on("keypress",function(){u===!0&&(n.removeAttr("data-icon-added"),r.hideInvalidIcon(t),r.hideSpinner(t),r.hideErrorIcon(t),r.hideErrorIcon(t),r.hideValidIcon(t),u=!1)})},blurEvent:function(n,t,i,r,u){var e=!i.isInProcessingMode(t)||i.isMultipleRequestAllowed(),f,s,o,h;e&&(f=r,s=i.dontSendSameRequestTwice()&&!i.isPreviousRequestIsSame(t,f,u),e=s||!i.dontSendSameRequestTwice(),e&&(o=i.isInputValidationRequirestoSendRequest(),e=o&&f.valid()||!o,e&&(h=i.concatAdditionalFields(f),i.sendRequest(t,f,u,h)),i.getSettings().focusPersistIfNotValid&&i.focusIfnotValid(f)))},focusIfnotValid:function(n,t){if(t===!0){n.focus();return}n.valid()===!1&&n.focus()},concatAdditionalFields:function(n){var t=this.additionalFields.slice(),i={name:n.attr("name"),value:n.val()};return t.push(i),t},getSubmitMethod:function(n){var t=this.getSettings().attributes;return n.attr(t.submitMethod)},abortPreviousAjaxRequest:function(n){this.showSpinner(n);this.hideInvalidIcon(n);this.hideErrorIcon(n);this.hideErrorIcon(n);this.hideValidIcon(n);this.isEmpty(this.ajaxRequest)||this.ajaxRequest.abort()},sendRequest:function(n,t,i,r){var e=this.getSubmitMethod(t),u=this,o=u.isDebugging,f=u.getSettings().events;this.isEmpty(f.beforeSendingRequest)||f.beforeSendingRequest(n,t,i,r);n.attr("data-icon-added","true");this.abortPreviousAjaxRequest(t);u.markAsProcessing(n,!0);u.setCurrentTextForNexttimeChecking(t);this.ajaxRequest=jQuery.ajax({method:e,url:i,data:r,crossDomain:!0,dataType:"JSON"}).done(function(i){o&&console.log(i);u.markAsProcessing(n,!1);u.processResponse(t,i);u.hideSpinner(t)}).fail(function(r,f,e){u.hideSpinner(t);u.errorProcess(n,t,r,f,e,i);console.log("Request failed: "+e+". Url : "+i)})},errorProcess:function(n,t,i,r,u,f){var e=i.status,o=this.getSettings(),s=o.events,h="";if(e===0&&(e=404,r="Requested url doesn't lead to a valid request."),h="Code "+e+" : "+r,this.showErrorIcon(t,h),o.focusPersistIfNotValid&&this.focusIfnotValid(t,!0),!this.isEmpty(s.onError))s.onError(n,t,i,r,u,f)},markAsProcessing:function(n,t){this.isDebugging&&console.log("Making: "+t);n.attr("data-is-processing",t)},isInProcessingMode:function(n){var t=n.attr("data-is-processing");return this.isDebugging&&console.log("is Processing: "+t),t==="true"},getInputNameOrId:function(n){var t=n.attr("id");return this.isEmpty(t)&&(t=n.attr("name")),t},setMessageOnIcons:function(n,t){var i=n.find("a").attr("title",t).attr("data-original-title",t).find("span");i.attr("title",t).attr("data-display",t)},createIcons:function(t,i,r,u){var h=this.getInputNameOrId(t),c=this.getValidator(),l=this.$element,a=this.getSettings(),o=a.events,s=this.getWrapperPrefix(),f=u+h,v="<\/span><\/a><\/div>",e;return c.append(v),e=n.byId(s+f),n.byId(f).tooltip(),this.isEmpty(o.iconCreated)||o.iconCreated(l,t,e),e},getWrapperPrefix:function(){return"wrapper-"},getValidator:function(){if(this.isEmpty(this.$validator)){var n=this.getSelectors();this.$validator=this.$element.find(n.validator)}return this.$validator},getCachedIcon:function(n,t){var r=this.getIdPrefixes(),s=this.getWrapperPrefix()+t+this.getInputNameOrId(n),e="$"+s,u=this[e];if(this.isEmpty(u)){var h=this.getMessages(),o="",f=this.getIcons(),i="";t===r.spinner?(i=f.spinner,o=h.requesting):t===r.valid?i=f.valid:t===r.invalid?i=f.invalid:t===r.error&&(i=f.error);u=this.createIcons(n,i,o,t);this[e]=u}return u},getInvalidIcon:function(n){if(this.isEmpty(this.$invalidMarkIcon)){var t=this.getIdPrefixes();this.$invalidMarkIcon=this.getCachedIcon(n,t.invalid)}return this.$invalidMarkIcon},getValidIcon:function(n){if(this.isEmpty(this.$validMarkIcon)){var t=this.getIdPrefixes();this.$validMarkIcon=this.getCachedIcon(n,t.valid)}return this.$validMarkIcon},getSpinner:function(n){if(this.isEmpty(this.$spinner)){var t=this.getIdPrefixes();this.$spinner=this.getCachedIcon(n,t.spinner)}return this.$spinner},getErrorIcon:function(n){if(this.isEmpty(this.$errorIcon)){var t=this.getIdPrefixes();this.$errorIcon=this.getCachedIcon(n,t.error)}return this.$errorIcon},showErrorIcon:function(n,t){var i=this.getErrorIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},showSpinner:function(n){var t=this.getSpinner(n);this.animateOn(t)},showInvalidIcon:function(n,t){var i=this.getInvalidIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},showValidIcon:function(n,t){var i=this.getValidIcon(n);this.setMessageOnIcons(i,t);this.animateOn(i)},hideValidIcon:function(n){var t=this.getValidIcon(n);this.animateOff(t)},hideErrorIcon:function(n){var t=this.getErrorIcon(n);this.animateOff(t)},hideInvalidIcon:function(n){var t=this.getInvalidIcon(n);this.animateOff(t)},hideSpinner:function(n){var t=this.getSpinner(n);this.animateOff(t)},animateOn:function(n){n.fadeIn("slow")},animateOff:function(n){n.hide()},processResponse:function(t,i){var u=this,f=this.$element,e=this.getSettings(),r=e.events,o;this.isEmpty(r.responseReceived)||r.responseReceived(f,t,i);o=e.response;i=n.extend({},o,i);i.isValid?u.validResponse(t,i):u.inValidResponse(t,i);this.isEmpty(r.responseProcessed)||r.responseProcessed(f,t,i)},validResponse:function(n,t){var e=this.isDisableInputOnValidation(),r=this.getSettings().events,o=this.getSettings(),i=this.$element,u=!0,f=t.message;this.isEmpty(r.validBefore)||r.validBefore(i,n,t);this.showValidIcon(n,t.message);e&&n.attr("disabled","disabled");i.attr("data-server-validated",u).attr("data-message",f);n.attr("data-server-validated",u).attr("data-message",f);o.hideOnValidation&&(i.attr("data-is-hidden",u),i.hide("slow"));this.isEmpty(r.validAfter)||r.validAfter(i,n,t)},inValidResponse:function(n,t){var u=this.getSettings(),i=u.events,r=this.$element,f=!1,e=t.message;this.isEmpty(i.invalidBefore)||i.invalidBefore(r,n,t);this.showInvalidIcon(n,t.errorCode+" : "+t.errorMessage);r.attr("data-server-validated",f).attr("data-message",e);n.attr("data-server-validated",f).attr("data-message",e);u.focusPersistIfNotValid&&this.focusIfnotValid(n,!0);this.isEmpty(i.invalidAfter)||i.invalidAfter(r,n,t)}});n.fn.serverValidate=function(t){var r=this,e,a,c,l,i,v;for(o=this,r.isInit!==!0&&(e=n.extend({},s,t),c=e.selectors,u=r.find(c.divContainer),a=h(r,c.additionalFields)),l=u,i=0;i