{"version":3,"file":"customvalidate.min.js","sources":["customvalidate.js"],"sourcesContent":["jQuery.validator.addMethod('numericlessthan', function (value, element, params) {\n var otherValue = $(params.element).val();\n\n return isNaN(value) && isNaN(otherValue) || (params.allowequality === 'True' ? parseFloat(value) <= parseFloat(otherValue) : parseFloat(value) < parseFloat(otherValue));\n}, '');\n\njQuery.validator.unobtrusive.adapters.add('numericlessthan', ['other', 'allowequality'], function (options) {\n var prefix = options.element.name.substr(0, options.element.name.lastIndexOf('.') + 1),\n other = options.params.other,\n fullOtherName = appendModelPrefix(other, prefix),\n element = $(options.form).find(':input[name=' + fullOtherName + ']')[0];\n\n options.rules['numericlessthan'] = { allowequality: options.params.allowequality, element: element };\n if (options.message) {\n options.messages['numericlessthan'] = options.message;\n }\n});\n\nfunction appendModelPrefix(value, prefix) {\n if (value.indexOf('*.') === 0) {\n value = value.replace('*.', prefix);\n }\n return value;\n}"],"names":["appendModelPrefix","value","prefix","indexOf","replace","jQuery","validator","addMethod","element","params","otherValue","$","val","isNaN","allowequality","parseFloat","unobtrusive","adapters","add","options","name","substr","lastIndexOf","fullOtherName","other","form","find","rules","message","messages"],"mappings":"AAkBA,SAASA,kBAAkBC,EAAOC,GAI9B,OAFID,EADwB,IAAxBA,EAAME,QAAQ,IAAI,EACVF,EAAMG,QAAQ,KAAMF,CAAM,EAE/BD,CACX,CAvBAI,OAAOC,UAAUC,UAAU,kBAAmB,SAAUN,EAAOO,EAASC,GACpE,IAAIC,EAAaC,EAAEF,EAAOD,OAAO,EAAEI,IAAI,EAEvC,OAAOC,MAAMZ,CAAK,GAAKY,MAAMH,CAAU,IAA+B,SAAzBD,EAAOK,cAA2BC,WAAWd,CAAK,GAAKc,WAAWL,CAAU,EAAIK,WAAWd,CAAK,EAAIc,WAAWL,CAAU,EAC1K,EAAG,EAAE,EAELL,OAAOC,UAAUU,YAAYC,SAASC,IAAI,kBAAmB,CAAC,QAAS,iBAAkB,SAAUC,GAC/F,IAAIjB,EAASiB,EAAQX,QAAQY,KAAKC,OAAO,EAAGF,EAAQX,QAAQY,KAAKE,YAAY,GAAG,EAAI,CAAC,EAErFC,EAAgBvB,kBADRmB,EAAQV,OAAOe,MACkBtB,CAAM,EAC/CM,EAAUG,EAAEQ,EAAQM,IAAI,EAAEC,KAAK,eAAiBH,EAAgB,GAAG,EAAE,GAErEJ,EAAQQ,MAAuB,gBAAI,CAAEb,cAAeK,EAAQV,OAAOK,cAAeN,QAASA,CAAQ,EAC/FW,EAAQS,UACRT,EAAQU,SAA0B,gBAAIV,EAAQS,QAEtD,CAAC"}