I am having difficulty configuring client-side validation of my application. I would like client validation, using jquery.validate.unobstrusive
, to accept numbers and dates located in pt-BR.
I've already done this in the startup
method of the application
var locale = "pt-BR";
RequestLocalizationOptions localizationOptions = new RequestLocalizationOptions {
SupportedCultures = new List<CultureInfo> { new CultureInfo(locale) },
SupportedUICultures = new List<CultureInfo> { new CultureInfo(locale) },
DefaultRequestCulture = new RequestCulture(locale)
};
and added <html lang="pt-br">
to the main HTML file.
It turns out that it worked fine for rendering server-side numbers and dates, but client-side validation is still waiting for inputs in en-US
.
How can I configure the Asp.NET Core MVC 2.0 application to accept numbers and dates in pt-BR
of the client side?