title: Remove object from modelstate validation
body: <p>I have two models:</p>
  
  <pre><code>public class UserInfo
  {
      public long ID { get; set; }
  
      [Required]
      [StringLength(50)]
      public string FirstName { get; set; }
  
      //...
  
      public bool Falg{ get; set; }
  }
  
  public class UserInfoExtra
  {
      public long ID { get; set; }
  
      [Required]
      public string PhoneNumber { get; set; }
  
      //...
  }
  </code></pre>
  
  <p>Those two models are combined in a ViewModel:</p>
  
  <pre><code>public class UserViewModel
  {
      public UserInfo UserInfo { get; set; }
      public UserInfoExtra ExtraInfo { get; set; }
  }
  </code></pre>
  
  <p>In the controller:</p>
  
  <pre><code>public ActionResult Create(UserViewModel userinfo)
  {
      if(userInfo.Flag){
          //Remove ExtaInfo from validation in ModelState.IsValid?
      }
      if (ModelState.IsValid)
      {
          db.UserInfos.Add(userinfo);
          db.SaveChanges();
          return RedirectToAction("Index");
      }
  
      return View(userinfo);
  }
  </code></pre>
  
  <p>How can I remove the <code>ExtraInfo</code> from validation in <code>ModelState.IsValid</code>?</p>