Guest User

Untitled

a guest
Feb 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function validatePhone(string){
  2. var numericExpression = /^[0-9]+$/;
  3. if(numericExpression.test(string)){
  4. return true;
  5. console.log('yeyeye');
  6. }else{
  7. console.log("Please enter a valid Phone Number");
  8.  
  9. return false;
  10. }
  11. }
  12.  
  13. var string='46456';
  14.  
  15. validatePhone(string);
Add Comment
Please, Sign In to add comment