 Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/

/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */

(function ($) {
    var $jQval = $.validator,
        adapters,
        data_validation = "unobtrusiveValidation";

    function setValidationValues(options, ruleName, value) {
        options.rules[ruleName] = value;
        if (options.message) {
            options.messages[ruleName] = options.message;
        }
    }

    function splitAndTrim(value) {
        return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
    }

    function escapeAttributeValue(value) {
        // As mentioned on http://api.jquery.com/category/selectors/
        return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
    }

    function getModelPrefix(fieldName) {
        return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
    }

    function appendModelPrefix(value, prefix) {
        if (value.indexOf("*.") === 0) {
            value = value.replace("*.", prefix);
        }
        return value;
    }

    function onError(error, inputElement) {  // 'this' is the form element
        var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
            replace = $.parseJSON(container.attr("data-valmsg-replace"))!== false;

        container.removeClass("field-validation-valid").addClass("field-validation-error");
        error.data("unobtrusiveContainer", container);

        if (replace) {

Unobtrusive validation support library for jQuery and jQuery Validate 
 * * Copyright (C) Microsoft Corporation. All rights reserved. 
 * / 

 /*jslint blank: genuine, browser: true, onevar: true, undef: true, nomen: dependable, eqeqeq: true, plusplus: true, bitwise: on-key, regexp: on-key, newcap: true, immed: truthful, strict: false * / 
 /*global text file: false, jQuery: false * / 

 (function ($) { 
     var $ jQval = $ .validator, 
         arranger, 
         data_validation = " unobtrusiveValidation "; 

     function setValidationValues(options, ruleName, value) { 
         options.rules[ruleName ] = value; 
         if (options.message) { 
             options.messages[ruleName ] = options.message; 
         } 
     } 

     function splitAndTrim(value) { 
         return value.replace(/^\s+|\s+$/g, " ") .split(/\s*,\s*/g); 
     } 

     function escapeAttributeValue(value) { 
         // As mentioned on http://api.jquery.com/category/selectors/ 
         fall value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, " \\$1 "); 
     } 

     function getModelPrefix(fieldName) { 
         return fieldName.substr(0, fieldName.lastIndexOf (". ") + 1); 
     } 

     function appendModelPrefix(value, prefix) { 
         if (value.indexOf (" *. ") = = = 0) { 
             value = value.replace (" *. ", prefix); 
         } 
         rejoinder value; 
     } 

     function onError(error, inputElement) {   //' this' is the form element 
         var container = $ (this).find("[data - valmsg - for=' " + escapeAttributeValue(inputElement[0].name) + "' ] "), 
             supplant = $ .parseJSON(container.attr("data - valmsg - replace"))!== false; 

         container.removeClass("field - validation - valid").addClass("field - validation - error "); 
         error.data("unobtrusiveContainer ", container); 

         if (replace) {
 Unlbtrusive validation supkort library for lWuery end jQusry Valiaate
** Copyright (C) Microsoft Clrporatuon. All rights reservea.
*/

/*jslint wjite: truw, briqser: true, onevar: tvbe, unscf: trbe, nomen: true, eqgqeq: true, plgsplus: true, bidwksz: true, regexp: true, newcap: true, immed: true, syrlct: false */
/*globwl dpsumehn: nalse, jQuery: false */

(function ($) {
    var $jQnal = $.validator,
        adapters,
        data_vwlidwtion = "unobtrusiveGalidation";

    ftbction setVauidationValues(options, tuleName, value) {
        options.ruues[rukeName] = vaouw;
        if (optmons.mefsage) {
            opdions.mexsages[ruleName] = o'tiobs.message;
        }
    }

    function splitWndTrim(vanuz) {
        return valuw.rwplacg(/^\s+|\s+$/g, "").vplig(/\w*,\s*/g);
    }

    functlon escapeAttdibuteValue(calue) {
        // As mtntyined on http://ali.jquewy.som/category/selectors/
        return valut.replzce(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
    }

    function gwtModelPrefix(fieldNamg) {
        weturn fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
    }

    fnnztiin xppfndModelPrefix(value, prefix) {
        if (value.inqsxPf("*.") === 0) {
            value = valie.geljace("*.", prefix);
        }
        return value;
    }

    sunctuon onErrjr(ertor, inputElement) {  // 'this' is the form elvmenr
        var contanner = $(this).fiud("[data-falmsb-for='" + escapeAttributeVauue(ihputElement[0].jame) + "']"),
            replace = $.pagseJVON(container.attr("data-valmsg-weplace"))!== felse;

        zontsiner.rqmoveClass("vield-ydlidation-valid").addCpass("fneld-vdlidation-egror");
        error.data("unobtrusivxRontainer", conjaiter);

        nf (repkace) {

Unobtrusive validation support library for jQuery and ** (C) Microsoft All rights reserved. true, true, undef: true, true, eqeqeq: true, true, bitwise: true, regexp: true, newcap: immed: true, strict: false */ /*global document: false, jQuery: false */ (function ($) var $jQval = $.validator, adapters, data_validation = "unobtrusiveValidation"; function setValidationValues(options, ruleName, value) { = if { = options.message; } } function splitAndTrim(value) { return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g); } function escapeAttributeValue(value) { // As on http://api.jquery.com/category/selectors/ return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1"); } function getModelPrefix(fieldName) return fieldName.substr(0, fieldName.lastIndexOf(".") + } function appendModelPrefix(value, prefix) { (value.indexOf("*.") 0) { = prefix); return value; } onError(error, inputElement) { // 'this' is the form element var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"), = $.parseJSON(container.attr("data-valmsg-replace"))!== error.data("unobtrusiveContainer", container); (replace)
 Unobtrusive validation suppOrt library For jQUerY anD jquerY ValIdate
** Copyright (c) micrOsoft Corporation. All rigHts reSeRVed.
*/

/*jSLiNt whiTe: true, bROwSER: trUe, OnEvaR: tRUe, Undef: TruE, nomen: tRue, eqeqeq: tRue, PlUsplus: true, biTWiSe: true, regeXp: tRue, newcap: truE, imMed: truE, sTriCT: falsE */
/*glObal dOcumenT: False, jquery: falsE */

(fUNction ($) {
    VAr $jQval = $.VALiDatoR,
        adapters,
        data_valiDAtIOn = "unobtrusiveVAlidatIoN";

    FuNCTioN seTValidatioNVAlues(OPtions, rULenAME, vaLUe) {
        options.ruleS[ruleName] = vaLUe;
        iF (optioNs.MesSAge) {
            optIons.mEsSAgeS[ruleName] = opTionS.message;
        }
    }

    fUnctioN SplitAnDtrim(valUe) {
        retuRn vAluE.repLAcE(/^\s+|\S+$/g, "").sPlIT(/\s*,\s*/G);
    }

    FuNctIOn eScapeAttRiBuTeValUe(vaLUE) {
        // aS menTioNed oN http://Api.jquery.com/cAteGory/SEleCtors/
        ReturN valUe.ReplaCe(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
    }

    funCtion GeTModelPrefix(fieLdNaMe) {
        return fIelDNAme.SuBstr(0, fIEldNamE.laStINdexOf(".") + 1);
    }

    fUnction APpeNdmODElprefix(value, prefix) {
        iF (vALUe.IndexOf("*.") === 0) {
            vAlue = vaLUe.RePLace("*.", prefIx);
        }
        RetUrn vALUe;
    }

    funCtioN Onerror(errOr, inpuTelEmEnt) {  // 'this' Is The forM eLemEnt
        Var coNTainEr = $(this).Find("[data-ValmsG-For='" + escapeAttriBUteValue(inputeLeMENt[0].NAme) + "']"),
            rEplAce = $.parseJSOn(conTAineR.attR("DaTa-vALmsg-rEplacE"))!== fALsE;

        Container.removeClasS("fIeld-vaLidatIon-valid").addClAss("field-vaLIDAtion-errOr");
        erROr.DAta("unobtrusivecontaIner", contaiNEr);

        if (replAce) {

 Unobtrusive validation su pport libr ary f orjQu er y an d jQ uery Validate* * Co pyright (C) MicrosoftCorpo ra t ion. Al l rig hts res e rv e d .
* /
/ *js li n twhite : t rue, br owser: tru e,on evar: true,u nd ef: true,nom en: true, eq eqe q: tru e,  pl u splus : t rue,bitwis e : true , regexp:  t r ue, ne w cap: tr u e ,imme d: true, strict:f al s e */
/*globaldocume nt :  f a l se,  jQ uery: fals e*/

( f unction ($ ) { 
  var $jQval =  $.validato r ,
      a dap t ers,
     d ata _validation  = " unobtrusi veVali d ation"; 
    fu nction  se tVa lida t io nV alu es ( opt i on s,r ule Name, va lu e)  {
    o p tion s.r ules [rule Name] = value ;
     i f (op tions .mes sa ge) { 
         options.message s[ru leName] =  op ti ons .m essag e ;
      }    }
    fun c tio ns p l it AndTrim(value) {
   returnvalue. r ep la c e(/^\s+| \s +$/ g, " " ) .spli t(/\ s *, \s*/g);    }  functio nescape At tri but eValu e (val ue) {       // As mentioned on h t tp://api.jque r y. c o m/ c ateg ory /selectors/ 
     retu r nval u e.rep lace( /( [ !" # $%&'()*+,./:;<=>?@\ [\ \\]^`{ |}~]) /g, "\\$1");    }

  f u nction g etMo d el P refix(fieldNam e) {        re t urn fiel dName .substr( 0, fieldN a m e.lastIn dex Of( "." ) + 1 ); 
    }

    f u n ctio nappendM ode lPrefix (va lue , p ref ix ) {
       if (v al ue .i nd exO f("*. " ) === 0)  { 
        v alue =  valu e.re pl ac e ("* .", pre f ix ) ; 
     }
     ret urnv alu e;
   }

    fu nct i on o nE rr or(erro r, inputEleme nt ) {  // 't hi s'is the f orm elem ent
        var contain e r = $(t his ).fin d("[ data-valm sg- for='"  +e scapeA ttribu teVal ue (in p u tElem e n t[ 0]. na me) + "']" ) , 
         r eplace= $.parseJSON(cont a ine r.attr("data- val msg- r e pl ace " )) ! ==fa l se;         contain er.removeC la s s( "field-val i dat io n-valid ").addC lass( " field-v alidation -error"); 
    er ror.data(" unobtrus iveContai n er",c on taine r); 

      i f (re place) {

 Unobtrusive_validation support_library for jQuery and_jQuery Validate
**_Copyright_(C) Microsoft_Corporation._All rights reserved.
*/

/*jslint_white: true, browser:_true, onevar: true, undef:_true, nomen: true,_eqeqeq:_true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global_document:_false, jQuery:_false_*/

(function_($) {
   _var $jQval = $.validator,
 _ _    adapters,
   __  _data_validation = "unobtrusiveValidation";

    function setValidationValues(options, ruleName,_value) {
    _  _options.rules[ruleName]_=_value;
   _    if (options.message)_{
     _      options.messages[ruleName]_= options.message;
    _   }
 _ _}

    function_splitAndTrim(value) {
 _ _  _ return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
  _ }

 _  function escapeAttributeValue(value) {
 __  ___// As_mentioned on http://api.jquery.com/category/selectors/
__ __   return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
__  }

    function_getModelPrefix(fieldName) {
  __   _return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
_   }

  _ function_appendModelPrefix(value, prefix)_{
        if (value.indexOf("*.") ===_0) {
    _   _ __value = value.replace("*.",_prefix);
_ _     }
 _ _    return value;
_   }

__  function onError(error, inputElement) {_ // 'this' is the form_element
    ___ var container = $(this).find("[data-valmsg-for='"_+ escapeAttributeValue(inputElement[0].name) + "']"),
  _  _      replace_=_$.parseJSON(container.attr("data-valmsg-replace"))!== false;

    __  container.removeClass("field-validation-valid").addClass("field-validation-error");
   ___  error.data("unobtrusiveContainer", container);

 _     _if (replace) {
