In ASP.NET MVC i can disable client side validation at field level like
@{ Html.EnableClientValidation(false); }
@Html.TextBoxFor(m => m.BatchId, new { @class = "k-textbox" })
@{ Html.EnableClientValidation(true); }
How do i do the same in ASP.NET Core Mvc?
I know i can do at application level in ConfigureService method
public void ConfigureServices(IServiceCollection services)
{
services
.AddMvc()
.AddViewOptions(options =>
{
options.HtmlHelperOptions.ClientValidationEnabled = false;
});
}
But i want to disable for a particular field
For Asp.Net Core, there is no built-in
Html.EnableClientValidation(false).For a workaround, you could try specify
new { data_val = "false" }in the view like