Function returns true if the passed string is a valid US phone number, otherwise false. If the country code is provided, function checks if the country code is 1. The following are all valid formats for US numbers: 555-555-5555 (555)555-5555 (555) 555-5555 555 555 5555 5555555555 1 555 555 5555
A script by V.