1Remove the required: true rule.
2
3Demo: Fiddle
4
5jQuery('.validatedForm').validate({
6 rules : {
7 password : {
8 minlength : 5
9 },
10 password_confirm : {
11 minlength : 5,
12 equalTo : "#password"
13 }
14 }
1var check = function() {
2 if (document.getElementById('password').value ==
3 document.getElementById('confirm_password').value) {
4 document.getElementById('message').style.color = 'green';
5 document.getElementById('message').innerHTML = 'matching';
6 } else {
7 document.getElementById('message').style.color = 'red';
8 document.getElementById('message').innerHTML = 'not matching';
9 }
10}