How do I disable Model validation for a single Action in a Controller ?

Disable the Required validation attribute in certain controller actions

Disable Required validation attribute under certain circumstances

Solution

public ActionResult Edit(int id)
{
         ModelState.Clear();
         return View();
}

 

About the Author

avatar