1 function checkIdentity(identity){ 2 var reg = /^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/; 3 if(reg.test(identity)){ 4 return true; 5 }else{ 6 return false; 7 } 8 }
1 function checkIdentity(identity){ 2 var reg = /^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/; 3 if(reg.test(identity)){ 4 return true; 5 }else{ 6 return false; 7 } 8 }