for password validation i am using equalTo:\"#password\"
Whether it is possible to check some sting by giving as equalTo:\"string to check\"
in jqu
equalTo only takes a selector here, but you can make a custom method for the check you want:
jQuery.validator.addMethod("equals", function(value, element, param) {
return this.optional(element) || value === param;
}, jQuery.format("You must enter {0}"));
Then you can use the a rule with the same name:
equals:"string to check"
You can test it here.
Override the equalTo: with below function
equalTo: function(element) {
if( (
$("#password").val() == "Your String Value Here"
) {
return true;
}else{
return false;
}