title: Compare Field Validation using Dataannotations causing Validation failure
body: <p>I'm building a Registration/Login engine for users.. Everything works fine except I'm using the Compare validation in my Model. When it goes to save my new User entity it gives me this error.</p>
  
  <p>Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.</p>
  
  <p>I know it's the Compare Validation because If I remove that property, my system works fine..  Also whats a great way to add a DropDown List for my Password Reset Question..  Thank You in advance and Here's my code... Please help..</p>
  
  <p>My Model:</p>
  
  <pre><code>public class User
  {
      public int UserID { get; set; }
  
      [Required(ErrorMessage = "A User Name is required max 10 characters")]
      [StringLength(10)]
      public string UserName { get; set; }
  
      [Required(ErrorMessage = "A First Name is required")]
      public string FirstName { get; set; }
  
      [Required(ErrorMessage = "Last Name is required")]
      public string LastName { get; set; }
  
      [Required]
      [DataType(DataType.EmailAddress, ErrorMessage = "Invalid Email Address")]
      public string Email { get; set; }
  
  
      [Required(ErrorMessage = "Password is required")]
      [DataType(DataType.Password, ErrorMessage = "Invalid Password")]
      public string Password { get; set; }
  
      [Compare("Password")]
      [Display(Name = "Confirmation Password")]
      public string ConfirmPassword { get; set; }
  
      public string PasswordSalt { get; set; }
  
      [Required(ErrorMessage = "Password Reset Question required")]
      public string PasswordHint { get; set; }
  
      [Required(ErrorMessage = "Password Reset Question Answer required")]
      public string PasswordHintAnswer { get; set; }
      public String UserRole { get; set; }
  
  
  }
  </code></pre>
  
  <p>My Controller:</p>
  
  <pre><code>public ActionResult Registration()
      {
          return View();
      }
  
      [HttpPost]
      public ActionResult Registration(FacultyScheduler.Models.User user)
      {
          if (ModelState.IsValid)
          {
              using (var db = new FacultyContext())
              {
  
                  var crypto = new SimpleCrypto.PBKDF2();
                  var encrypPass = crypto.Compute(user.Password);
                  var sysUser = db.Users.Create();
  
  
                  sysUser.UserName = user.UserName;
                  sysUser.Email = user.Email;
                  sysUser.UserID = user.UserID;
                  sysUser.LastName = user.LastName;
                  sysUser.FirstName = user.FirstName;
                  sysUser.Password = encrypPass;
                  sysUser.ConfirmPassword = user.ConfirmPassword;
                  sysUser.PasswordSalt = crypto.Salt;
                  sysUser.PasswordHint = user.PasswordHint;
                  sysUser.PasswordHintAnswer = user.PasswordHintAnswer;
                  db.Users.Add(sysUser);
                  db.SaveChanges();
  
                  return RedirectToAction("Index", "Home");
              }
  
  
          }
  
          return View(user);
      }
  </code></pre>