Saturday, 6 March 2021

MVC - Custom Validator - Fix Error - 0x800a138f - JavaScript runtime error: Unable to get property 'unobtrusive' of undefined or null reference

Watch this example on YouTube

 

 

 

 0x800a138f - JavaScript runtime error: Unable to get property 'unobtrusive' of undefined or null reference

 

 

In Layout replace

 

 

    @Scripts.Render("~/bundles/jqueryval")

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/Scripts/CustomValidation.js")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>

 

with

 
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")

    @Scripts.Render("~/Scripts/CustomValidation.js")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>

No comments:

Post a Comment