see code
isValidNo : function(mobileNo){ var v = false; if(mobileNo == null || mobileNo == "" || mobileNo.length != 11) { return false; } var myreg = / ^ (((13 [0-9] {1}) | (15 [0-9] {1}) | (17 [0-9] {1}) | (18 [0-9] {1}) | (14 [0-9] {1})) + \ d {8}) $ /; if(myreg.test(mobileNo)){ v=true; } return v; }
The above is only suitable for the numbers currently supported by major operators, if you want to add more, you can add it yourself