title: Controller action not being hit
body: <p>I have the following form that is trying to let a User SignIn:</p>
  
  <pre class="lang-asp prettyprint-override"><code>&lt;form method="post" asp-controller="Auth" asp-action="SignIn"&gt;
      &lt;div class="form-group row"&gt;
          &lt;div class="col"&gt;
              &lt;input class="form-control" type="email" placeholder="Email" id="email-input" name="email"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group row"&gt;
          &lt;div class="col"&gt;
              &lt;input class="form-control" type="password" placeholder="Password" id="password-input" name="password"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group row"&gt;
          &lt;div class="col"&gt;
              &lt;button class="btn btn-success" type="submit" name="button" style="width: 100%;"&gt;Login&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>As you can see the form is using a Controller named Auth and an action on the Controller named SignIn. Here is a sample of the Controller:</p>
  
  <pre><code>public class AuthController : Controller
  {
      public IActionResult Index()
      {
          return View(new SignInViewModel());
      }
  
      [HttpPost]
      public async Task&lt;IActionResult&gt; SignIn(SignInViewModel model)
      {
          if (ModelState.IsValid)
          {
              if (await _userService.ValidateCredentials(model.Email, model.Password, out var user))
              {
                  await SignInUser(user.Email);
                  return RedirectToAction("Index", "Home");
              }
          }
          return View(model);
      }
  }
  </code></pre>
  
  <p>I've set a breakpoint on the line <code>if (ModelState.IsValid)</code> and it never gets hit. When I click the login button the page simply refreshes. I really cannot see why this breakpoint is not being hit when the Controller and the Action seem OK to me.</p>
  
  <p>EDIT: <code>SignInViewModel</code>:</p>
  
  <pre><code>public class SignInViewModel
  {
      [Required(ErrorMessage = "Please Enter an Email Address")]
      public string Email { get; set; }
  
      [Required(ErrorMessage = "Please Enter a Password")]
      public string Password { get; set; }
  }
  </code></pre>
  
  <p>Snippet from Chrome:</p>
  
  <p><a href="https://i.stack.imgur.com/6RjDN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RjDN.jpg" alt="enter image description here"></a></p>