title: IValidateObject how to Clear/Reset ModelState.IsValid
body: <p>I have a class that implements IValidateObject. My business rule is satisfied after I do some additional work in a controller's action. The problem I have is the ModelState.IsValid is still false. I am trying to find how to have it reset or rerun so the ModelState is updated. I tried TryUpdateModel, that trigged the Validate method and if I step through my rule is now valid, but ModelState.IsValid is still false (and I can see it is still complaining about the same rule). </p>
  
  <pre><code>    [HttpPost]
      public ActionResult Create(MyModel model)
      {
          //ModelState.IsValid is False at this point
  
          //model.Do More Stuff To Satisfy IValidateObject rule. At this point all my rules are valid
  
          TryUpdateModel(model); // &lt;-- If run TryUpdateModel and step through, I can see my rule is valid 
  
          if (ModelState.IsValid) // this is still False
          {
              //Save
          }
      }
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I ended up calling </p>
  
  <pre><code>ModelState.Clear();
  </code></pre>
  
  <p>[HttpPost]</p>
  
  <pre><code>   public ActionResult Create(MyModel model)
     {   
          //model.Do More Stuff To Satisfy IValidateObject rule. At this point all my rules are valid
          ModelState.Clear();
  
          TryUpdateModel(model); 
  
          if (ModelState.IsValid)
          {
              //Save
          }
      }
  </code></pre>