When I run my code, I get this error:
Unable to get value of the property 'unobtrusive': object is null or undefined
It would be fine, but I add all the necessary jquery stuff:
jquery.validate-vsdoc.js jquery.validate.js jquery.validate.min.js jquery.validate.unobtrusive.js jquery.validate.unobtrusive.min.js jquery.unobtrusive-ajax.js jquery.unobtrusive-ajax.min.js
I upload this to my main form:
@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval")
And my bundle configuration has:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*", "~/Scripts/jquery.validate*"));
My Script folder has all the related files.
Why am I getting this error? Comment, if you need to see any file, and I will gladly publish it
EDIT:
Scripts are loading (I checked) This line gives an error:
jQuery.validator.unobtrusive.prototype.parse.call(this, selector);
ERROR:
SCRIPT5007: Unable to get value of the property 'unobtrusive': object is null or undefined
source share