title: asp.net mvc 3 run validations on a model
body: <p>How can i run all DataAnnotation validations on model?</p>
  
  <p>I'm building a model instance from code and i don't have no modelstate binding or anything. I just want to run all my validations against it... I am using EF CodeFirst.</p>
  
  <pre><code>public class Category
  {
      public int Id { get; set; }
  
      [Required]
      public string Name { get; set; }
  }
  
  cat = new Category();
  if (cat.IsValid()) { /* blah */ } // i want something like this
  </code></pre>
  
  <p>I know it's probably a stupid question but i can't seem to find an answer anywhere..</p>