The guys at Signal vs. Noise have a new book coming out and they posted a link to a sample chapter in PDF format. It’s worth downloading and checking out, especially for the plain advice and tips for formatting and validating phone numbers.
I have found that phone number validation is really important, especially in web-apps. If you restrict the formatting of phone numbers to only a specific format, it just makes it difficult to use. A really good example is the AT&T Send-Text Message page. You can enter any string of digits and it will automatically format according to AT&T’s desires.