asp.net-mvc-5 – Jquery validate does not validate correctly

Question:

I'm using Jquery validate and unobtrusive for validation on an asp.net mvc 5 project

When I needed to work with decimal numbers, in search I found this Link where there are validations and etc.

But I have the following problem:

If I leave my Bundle like this:

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*",
                        "~/Scripts/methods_pt.js"));

It works correctly for my Decimal fields, but it stops removing the ValidationMessageFor msg when filling the other fields correctly from the other validations (required for example)

And if I leave it like this:

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.validate*",
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/methods_pt.js"));

It works my validations but the decimals validation doesn't work

Answer:

I use it like this:

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.validate.js",
                    "~/Scripts/jquery.validate.unobtrusive.js",                        
                    "~/Scripts/jquery.validate.globalize.js"));

The decimal problem has nothing to do with jQuery Validate, but that Globalize is missing:

https://www.nuget.org/packages/jQuery.Validation.Globalize/

Scroll to Top