I have been reading about how to manipulate regex, and I do think I have the correct formula for my purpose, but I cannot seem to get it to work.
This is my code
$.validator.addMethod("pwcheck", function(value) { var regex = /^[a-zA-Z0-9]*$/; if (!regex.test(value)) { return false; } });
I added this method to my password in the .validate({rules{}});
It is linked properly, but whatever I input in the text box I get the message I wrote in the .validate({messages{}});
the user should be only allowed to input letters and numbers, and seeing other methods posted on this site I tried to mimic and copy them, but it isn't working.