EllisLab/CodeIgniter — pull request #772 by tyler-m-dunn (2011-12-13 01:43:52+00:00)
Title: Added valid_us_phone and valid_us_phones methods to Form_validation library

Much as the title implies, I have added the functionality to validate a U.S. phone number in the default Form_validation library.

Valid phone numbers have the following properties:
* Can have 10 or 11 digits. If 11 characters, the first must be a `1`.
* The area code (first 3-digit section, minus initial `1`) may have parentheses.
* Each of the three (or 4 with initial `1`) segments may be separated by spaces, dashes, or nothing.

The corresponding documentation has also been updated.