jQuery Validator Issue

Associate
Joined
30 Mar 2004
Posts
1,148
Location
West Wing
Hi all,

I have this bit of code that checks if the user has entered a 5 digit number in a box.

Code:
jQuery.validator.addMethod("IDValidation", function (value, element) {

            return /^\d{5}$/.test(value);
        }, "Incorrect Code");

I want to change it so that it only checks the user has entered 5 characters (digits or alphabet). I honestly dont know my way around jQuery or PHP at all!
 
Back
Top Bottom