I use jQuery Unobtrusive confirmation ... I am configured with Globalize to accept numbers like this: 1.500.50 (Masked by JQuery)
My code is bye
1-) Customized Globalization
$.validator.methods.number = function (value, element) { return this.optional(element) || !isNaN(Globalize.parseFloat(value)); }; $(function () { Globalize.culture('pt-BR'); });
2-) Configured web.config
<globalization culture="pt-BR" uiCulture="pt-BR" />
Ok, so I use the jQuery plugin to format Textbox to Money (PT-BR): 1.500.000.50 ...
My jquery client check works fine! But when it comes to server verification, I got a ModelState error:
"The value '1.500.000,50' is not valid for Total."
How can i fix this?
thanks
source share