Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validatePhone(string){
- var numericExpression = /^[0-9]+$/;
- if(numericExpression.test(string)){
- return true;
- console.log('yeyeye');
- }else{
- console.log("Please enter a valid Phone Number");
- return false;
- }
- }
- var string='46456';
- validatePhone(string);
Add Comment
Please, Sign In to add comment