Node.js examples for Regular expression:Validation
Is valid phone number by regex
var isValidPhoneNum = function(str){ var reg = new RegExp(/^((13[0-9])|(147)|(15[^4,\D])|(17[0-9])|(18[0,0-9]))\d{8}$/); if(typeof str === 'string') return reg.test(str); return reg.test(str.toString()); };