Node.js examples for Regular expression:Validation
Is valid postal code
var isValidPostalCode = function(str){ var reg = new RegExp(/^[0-8]\d{5}(?!\d)$/); if(typeof str === 'string') return reg.test(str); return reg.test(str.toString()); };