title: Validation not working on ViewModel
body: <p>Ok, I have a ViewModel that looks like this:</p>
  
  <pre><code>public class UserLogin
  {
      [Required]
      public string EmailAddress { get; set; }
  
      [Required]
      public string Password { get; set; }
  }
  </code></pre>
  
  <p>My controller looks like this:</p>
  
  <pre><code>[HttpPost]
  public ActionResult LogIn(UserLogin model)
  {
      if (!ModelState.IsValid)
      {
          // ...
      }
  }
  </code></pre>
  
  <p>My view looks like this:</p>
  
  <pre><code>&lt;% Html.BeginForm("Join", "User", FormMethod.Post); %&gt;
      &lt;%= Html.Hidden("ReturnUrl", Request.Url.AbsolutePath) %&gt;
  
      &lt;%= Html.TextBoxFor(c =&gt; c.EmailAddress, new { id = "join-emailaddress", @class = "text", uiHintText = "Email address" })%&gt;
      &lt;%= Html.ValidationMessageFor(c =&gt; c.EmailAddress, "*") %&gt;
  
      &lt;%= Html.PasswordFor(c =&gt; c.Password, new { id = "join-password", @class = "text", uiHintText = "Password" })%&gt;
      &lt;%= Html.ValidationMessageFor(c =&gt; c.Password, "*")%&gt;
  
      &lt;%= Html.PasswordFor(c =&gt; c.PasswordConfirm, new { id = "join-password-confirm", @class = "text", uiHintText = "Password (repeat)" })%&gt;
      &lt;%= Html.ValidationMessageFor(c =&gt; c.PasswordConfirm, "*")%&gt;
  
      &lt;input type="submit" value="Sign me up!" class="submit" /&gt;
  &lt;% Html.EndForm(); %&gt;                
  </code></pre>
  
  <p>If I post the form with nothing entered in any of the fields, I consistently get a value of 'true' for 'ModelState.IsValid'.</p>
  
  <p>Shouldn't it be 'false', since I've marked those fields as 'Required' and not entered any values?</p>