title: Compare validator is always firing off even when the passwords are the same
body: <p>Here's the reason why. This is the generated HTML:</p>
  
  <pre><code>    &lt;div&gt;
          &lt;label for="RegisterModel_Password"&gt;Contrase&amp;#241;a&lt;/label&gt;
          &lt;input class="text-box single-line password" data-val="true" data-val-length="Su Contrase&amp;amp;#241;a debe tener al menos 6 caracteres." data-val-length-max="100" data-val-length-min="6" data-val-required="Debe escribir su contrase&amp;amp;#241;a" id="RegisterModel_Password" name="RegisterModel.Password" type="password" value="" /&gt;
          &lt;span class="field-validation-valid" data-valmsg-for="RegisterModel.Password" data-valmsg-replace="true"&gt;&lt;/span&gt;
  
      &lt;/div&gt;
  
      &lt;div&gt;
          &lt;label for="RegisterModel_ConfirmPassword"&gt;Confirme Su Contrase&amp;#241;a&lt;/label&gt;
          &lt;input class="text-box single-line password" data-val="true" data-val-equalto="Sus contrase&amp;amp;#241;as no son las mismas." data-val-equalto-other="*.Password" id="RegisterModel_ConfirmPassword" name="RegisterModel.ConfirmPassword" type="password" value="" /&gt;
          &lt;span class="field-validation-valid" data-valmsg-for="RegisterModel.ConfirmPassword" data-valmsg-replace="true"&gt;&lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Notice this, in the confirm password box:</p>
  
  <pre><code>data-val-equalto-other="*.Password"
  </code></pre>
  
  <p>This should be <code>RegisterModel.Password</code>, as I'm guessing the javascript looks like the input with the name "RegisterModel.Password", no?</p>
  
  <p>Here's my model code:</p>
  
  <pre><code>[Required(ErrorMessage = "Debe escribir su contraseña")]
  [StringLength(100, ErrorMessage = "Su {0} debe tener al menos {2} caracteres.", MinimumLength = 6)]
  [DataType(DataType.Password)]
  [Display(Name = "Contraseña")]
  public string Password { get; set; }
  
  [DataType(DataType.Password)]
  [Display(Name = "Confirme Su Contraseña")]
  [Compare("Password", ErrorMessage = "Sus contraseñas no son las mismas.")]
  public string ConfirmPassword { get; set; }
  </code></pre>
  
  <p>Any ideas on why this is happening? </p>
  
  <hr>
  
  <p>Just created a brand new MVC3 application and this is the model:</p>
  
  <pre><code>[Required]
  [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
  [DataType(DataType.Password)]
  [Display(Name = "Password")]
  public string Password { get; set; }
  
  [DataType(DataType.Password)]
  [Display(Name = "Confirm password")]
  [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
  public string ConfirmPassword { get; set; }
  </code></pre>
  
  <p>And the validation works. The only difference here is that they're use the model directly in the view, whereas I'm passing a *<em>View</em>*Model that contains that RegisterModel.</p>
  
  <p>The HTML of this working default is different to mine though:</p>
  
  <pre><code>        &lt;div class="editor-field"&gt;
              &lt;input data-val="true" data-val-length="The Password must be at least 6 characters long." data-val-length-max="100" data-val-length-min="6" data-val-required="The Password field is required." id="Password" name="Password" type="password" /&gt;
              &lt;span class="field-validation-valid" data-valmsg-for="Password" data-valmsg-replace="true"&gt;&lt;/span&gt;
          &lt;/div&gt;
  
          &lt;div class="editor-label"&gt;
              &lt;label for="ConfirmPassword"&gt;Confirm password&lt;/label&gt;
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              &lt;input data-val="true" data-val-equalto="The password and confirmation password do not match." data-val-equalto-other="*.Password" id="ConfirmPassword" name="ConfirmPassword" type="password" /&gt;
              &lt;span class="field-validation-valid" data-valmsg-for="ConfirmPassword" data-valmsg-replace="true"&gt;&lt;/span&gt;
          &lt;/div&gt;
  </code></pre>