$.validator.addMethod("phone", function(ph, element) { if (ph == null) { return false; } var phoneRe = /^((\+\d{1,3}(-| )?\(?\d\)?(-| )?\d{1,5})|(\(?\d{2,6}\)?))(-| )?(\d{3,4})(-| )?(\d{4})(( x| ext)\d{1,5}){0,1}$/; return phoneRe.test(ph); }, "Please enter a valid phone number");