title: Jquery form Validation - equalTo not working?
body: <p>I want the user to confirm the password. I have used Jquery's validate function to validate the form. After entering the correct password, it shows me an error as <strong>Password not Match !</strong>.</p>
  <p>In hmtl:</p>
  <pre><code>  &lt;form class=&quot;form-password&quot; id=&quot;formId&quot; method=&quot;POST&quot;&gt; 
              &lt;input type=&quot;password&quot; name=&quot;old_password&quot; class=&quot;form-control bsdbsdhdhu&quot; placeholder=&quot;Enter Old Password&quot;&gt;
              &lt;input type=&quot;text&quot; class=&quot;form-control bsdbsdhdhu&quot; name=&quot;new_password&quot; placeholder=&quot;Enter New Password&quot;&gt;
              &lt;input type=&quot;text&quot; class=&quot;form-control bsdbsdhdhu&quot; name=&quot;retype_password&quot; placeholder=&quot;Enter Re-enter Password&quot;&gt;
              &lt;button type=&quot;submit&quot; class=&quot;submit-button&quot;&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
  </code></pre>
  <p>In .js:</p>
  <pre><code>jQuery('#formId').validate({
      rules: {
          old_password: {
              required: true,
          },
          new_password: {
              required: true,
              minlength: 8,
          },
          retype_password: {
              required: true,
              minlength: 8,
              equalTo: '#new_password',
          }
      },
      messages: {
          old_password: {
              required: 'Please Enter Old Password',
          },
          new_password: {
              required: 'Please Enter New Password',
              minlength: 'Password length must be 8',
          },
          retype_password: {
              required: 'Please Retype Password',
              minlength: 'Password Lenght Must be 8',
              equalTo: 'Password Not Matched !',
          }
      },
      submitHandler: function(form) {
          form.submit();
      }
  });
  </code></pre>