6
I’m having trouble validating dates and numbers on the client side using MVC 5 Asp.net. Examples and tutorials I find on the internet are all outdated.
I made the modifications according to this reply and the validation began to work correctly in Portuguese, but now occurs on the side of server side.
I installed both packages:
- jquery-globalize
- jquery.validation.globalize
On my page include these 4 references:
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/Scripts/jquery.validate.js")
@Scripts.Render("~/Scripts/jquery.validate.unobstrusive.js")
@Scripts.Render("~/Scripts/globalize.js")
@Scripts.Render("~/Scripts/jquery.validate.globalize.js")
}
And on the web.config:
<system.web>
<!-- outros parametros -->
<globalization culture="pt-BR" uiCulture="pt-BR" />
</system.web>
Obs: I’m following this tutorial link
Would someone have some more complete example, or could explain to me what is missing?
Bruno, have a related answer Here. Maybe it will help you in the implementation.
– Renan Carlos
Hello. There is a sequence that scripts should respect.
– Wilson Santos
Possible duplicate of Date problem with globalize.js and jquery.validation.globalize.js. How to solve?
– Renan Carlos