Manually Set ModelState.isValid from Controller
You can't set ModelState.IsValid
directly, as it's a derived property that simply checks the models error collection. You can however add your own model errors, e.g:
ModelState.AddModelError("Region", "Region is mandatory");
ModelState.IsValid
will then return false.