In the project, MVCI include the necessary links for validationusing:
@Scripts.Render("~/bundles/jqueryval")
On my page _Layout. But, for example, the Registercheck does not work on my page unless I add this code to the page Register. In both cases, when I look at the source of my page, I see the necessary links there.
<script src="/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive-custom-for-bootstrap.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
So everything is working fine. It does not add links twice, but I could not understand what is the difference?
Here is my bundle code:
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
Note. I pass a few style packages in mine _Layoutand does not cause any problems.
source
share