Hey, On my schedule editor pop up I'd like to enforce the server side model validation, however currently, if ModelState.IsValid == false, rather than keeping the editor open and showing an error it closes.
Is there a way for the editor to stay open if the model validation returns false?
public async Task<JsonResult> SchedulerCreate([DataSourceRequest] DataSourceRequest request, TaskViewModel task)
{
if (ModelState.IsValid)
{
await Persist(task);
}
return Json(new[] { task }.ToDataSourceResult(request, ModelState));
}