title: Is there a strongly-named way to remove ModelState errors in ASP.NET MVC
body: <p>Is there a way to remove ModelState errors during an ASP.NET MVC postback without having to write each one by hand.</p>
  
  <p>Let's say we have a checkbox <code>Billing Same As Shipping</code> and we want to then ignore anything user wrote for <code>ShippingAddress</code> when it's checked - typically what you might do is this.</p>
  
  <pre><code>ModelState.Remove("Checkout.ShipppingAddress.FirstName");
  ModelState.Remove("Checkout.ShipppingAddress.LastName");
  ModelState.Remove("Checkout.ShipppingAddress.Address1");
  ModelState.Remove("Checkout.ShipppingAddress.Address2");
  ...
  ModelState.Remove("Checkout.ShipppingAddress.ZipCode");
  </code></pre>