2 * matches US phone number format
4 * where the area code may not start with 1 and the prefix may not start with 1
5 * allows '-' or ' ' as a separator and allows parens around area code
6 * some people may want to put a '1' in front of their number
17 $.validator
.addMethod("phoneUS", function(phone_number
, element
) {
18 phone_number
= phone_number
.replace(/\s+/g, "");
19 return this.optional(element
) || phone_number
.length
> 9 &&
20 phone_number
.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
21 }, "Please specify a valid phone number");