title: ModelState.IsValid even when it should not be?
body: <p>I have API where I need to validate my user model. I choose an approach where I create different classes for Create/Edit actions to avoid mass-assignment and divide validation and actual model apart.</p>
  
  <p>I don't know why but <code>ModelState.IsValid</code> returns true even when it should not. Am I doing something wrong?</p>
  
  <h1>Controller</h1>
  
  <pre><code>public HttpResponseMessage Post(UserCreate user)
  {
      if (ModelState.IsValid) // It's valid even when user = null
      {
          var newUser = new User
          {
              Username = user.Username,
              Password = user.Password,
              Name = user.Name
          };
          _db.Users.Add(newUser);
          _db.SaveChanges();
          return Request.CreateResponse(HttpStatusCode.Created, new { newUser.Id, newUser.Username, newUser.Name });
      }
      return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
  }
  </code></pre>
  
  <h1>Model</h1>
  
  <pre><code>public class UserCreate
  {
      [Required]
      public string Username { get; set; }
      [Required]
      public string Password { get; set; }
      [Required]
      public string Name { get; set; }
  }
  </code></pre>
  
  <h1>Debug proof</h1>
  
  <p><img src="https://i.stack.imgur.com/KaVZ3.png" alt="proof"></p>