Valid US phone number in ColdFusion

  • Post author:
  • Post category:Uncategorized

In an application, I am using ColdFusion’s isValid function to validate a US phone number. In my testing, I was getting “invalid phone number” from a number that starts with 1 (no area code). This was not a phone number I pulled from a DB or anything, I just put random numbers in.I did some testing, and it turns out that ColdFusion’s function will not accept any 7 digit phone number between 1111111 and 1999999. Numbers between 2000000 and 9999999 are valid. I suppose this is according to the government regulations for phone numbers, but I didn’t know that. Learn something new every day. 🙂