Quantcast
Channel: Zoho Creator Knowledge base
Viewing all articles
Browse latest Browse all 32

What is the Regex expression to validate a phone number in the format 999-999-9999?

$
0
0

The following regex expression is used to validate the phone number in the format 999-999-9999
  1. errors = List:String();
  2. e = input.no;
  3. if(e.matches(“[0-9]{3}-[0-9]{3}-[0-9]{4}”)== false)
  4. {
  5.       errors.add(“Number format is not correct”);
  6. }

Viewing all articles
Browse latest Browse all 32

Trending Articles