c# - Mvc4 giving me this error 'jQuery.validator.unobtrusive' is null or not an object' -
i have written client side custom validation in separate javascript file named (mycustomvalidations.js) and code javascript(mycustomvalidations.js) file jquery.validator.unobtrusive.adapters.add ("selectedvaluewithenteredvaluecheck", ["param"], function (options) { options.rules["selectedvaluewithenteredvaluecheck"] = options.params.param; options.messages["selectedvaluewithenteredvaluecheck"] = options.message; }); jquery.validator.addmethod("selectedvaluewithenteredvaluecheck", function (value, element, param) { console.log(value); console.log(param); var usrenteredvalue = parseint(param); var ddlselectedvalue = json.stringify(value); if(ddlselectedvalue == 'amount') { if(usrenteredvalue < 10 || usrenteredvalue > 20) { return false; } } return true; } ); and view .. @scripts.render("~/bundles/...