title: Using Knockoutjs And Server Side Validation in .NET MVC2
body: <p>I'm using MVC2.</p>
  
  <p><strong>Whats the recommended way of server side validation of forms when using knockout?</strong></p>
  
  <p>Currently, most of my forms are in partial views, which have a C# ViewModel with Validation Attributes.  Something like this:</p>
  
  <pre><code>public class SomeThingViewModel
  {
      [Required]
      public string Name { get; set; }
  
      [Required]
      public int Number{ get; set; }
  }
  </code></pre>
  
  <p>So when the form gets submitted to the server, I get all the model errors and I can return the form with errors, which are displayed with something like: &lt;%: <code>Html.ValidationMessageFor(m =&gt; m.Name)%&gt;</code>.  This is then reloaded into the element that holds the form on the main page so that the user can see the errors.  This would kill any bindings I had with the form in knockout I would assume.</p>
  
  <p>I'm not really sure how to go about this using knockout.</p>