17
rated 0 times
[
19]
[
2]
/ answers: 1 / hits: 15787
/ 10 Years ago, sat, october 4, 2014, 12:00:00
I validate my form using jquery validate like this:
$(#formuser).validate({
rules: {
accountname: {
required: true,
minlength: 6
},
T1: {
required: true,
minlength: 6
},
accountpassword1: {
required: true,
minlength: 8
},
accountpassword2: {
required: true,
minlength: 8,
equalTo: #accountpassword1
},
},
});
HTML:
<input id=accountpassword1 class=text-input form-control type=text name=accountpassword1 size=24 placeholder=password >
<input class=text-input form-control type=text name=accountpassword2 size=24 placeholder=password >
this worked for me But. I need to check jquery validate when password1 and password 2 not empty. my mean is if password input is empty jquery validate not validate field else validate field password1 and password2.
how do create this?
NOTE:: i need to only check validate accountpassword1
and accountpassword1
with this method.
More From » jquery