title: How to use ModelState.SetModelValue() to set value of a List and get Model re-validated?
body: <p>My <code>Model</code> have a property which is a <code>List&lt;int&gt;</code>. In the UI it is a <code>Select2</code> autocomplete with multiple option set true. Since the <code>DefaultModelBinder</code> will not bind comma-separated values, the <code>ModelState.IsValid</code> always appears <code>false</code>.</p>
  
  <p>I am using below code to set the value manually and get the <code>Model</code> re-validated. Now value has been changed to an empty <code>List&lt;int&gt;</code> from <code>null</code> but there should be items in it and the <code>ModelState</code> is also false.</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;ActionResult&gt; Add(Contractor contractor, string OtherContactsIDs)
  {
      ModelState.Remove("OtherContactsIDs");
      ModelState.Add("OtherContactsIDs", new ModelState());
      ModelState.SetModelValue("OtherContactsIDs", 
          new ValueProviderResult(OtherContactsIDs.Split(',')
              .Select(i =&gt; { return int.Parse(i); }).ToList(), 
              ValueProvider.GetValue("OtherContactsIDs").AttemptedValue, null));
  
      if (ModelState.IsValid)
      {
  </code></pre>
  
  <p>What is the best way to achieve this?</p>