0

I have spent a lot of time sifting through bad answers to this question. Every answer I see is one of the following:

  1. Uses web.config (this is retired in asp.net core, and it seems like there ought to be a method other than hacking in old features)
  2. Suggests turning off javascript. The problem is, I need javascript running--I just don't want the client-side validation.
  3. Offers code that doesn't compile and gives no context of where the code should go or how to make it so it will compile.

Am I trying to do something unsupported? This seems like it would be a standard part application testing.

1 Answer 1

2

The client-side validation in ASP.NET Core can be disabled as follows:

Add

services.AddMvc().AddViewOptions(options => 
options.HtmlHelperOptions.ClientValidationEnabled = false);

in ConfigureServices() of Startup.cs.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.