JesseHedges
3 years agoOccasional Contributor
Semantic error when generating phone number
I'm using the DataSource Generator to generate a random phone number to use in my tests. I'm using the Custom String type, so I can specify an area code like so: %PHONE(408-XXX-XXXX) However, about 30% of the time, it generates an invalid phone number like 408-0XX-XXXX or 408-1XX-XXXX and I get a "semantic error" message in my response, because the phone number format is invalid.
For US phone numbers, how would I modify my Custom String to make this work? Or is it controlled by the application? If so, could we get that fixed?