Question

I have got appsetting for

<add key="ClientValidationEnabled" value="false" />
<add key="UnobtrusiveJavaScriptEnabled" value="false"  />

in the root config file.

which I want to override in the areas section to set the values to true. Now the Required Attribute on the Model validaton still does not do client validation as the flags are still set to false

Thanks

Was it helpful?

Solution

Inside a view you can set those to true using the Html property.

@Html.ClientValidationEnabled = true;
@Html.UnobtrusiveJavaScriptEnabled = true;

In the area level, I think you can try by creating a simple web.config inside the corresponding folder and overriding those two as true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top