How to check customer validation on in an ASP.NET Core MVC 2.0 application to recognize EN standard

Asked

Viewed 211 times

1

I’m having trouble setting up client-side validation gift my app. I’d like customer validation by using jquery.validate.unobstrusive, accept numbers and dates located in.

I have already made this setting in the method startup 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"> in the main HTML file.

Turns out it worked fine to render server-side numbers and dates, but client-side validation is still waiting for input on en-US.

How can I configure the Asp.NET Core MVC 2.0 application to accept numbers and dates on pt-BR client-side?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.