Some telephone extensions are 4 or 5 digits in length. Attempts to enter a US or CA phone number with a 4-digit extension (for example, "651-644-1234 x1234") encounter either a format error (ex. "'651-644-12341234' is not a valid North American phone number") or exceed the length limitations of the field (e.g. with the previous example, using proper format limits the extension to 3 digits, e.g. "651-644-1111 123" or "651-644-1111x123")

The length constraints for US/CA phone numbers should be changed to allow extensions of up to at least 5 characters.

Comments

xjm’s picture

Good idea. Seems like this would be pretty easy to patch.

organicwire’s picture

The limitation is indeed a problem. Not only in the US. Any number can have extension. Plus, users want to input characters such as brackets and dashes. E.g
+49 (0)178 41 12 411 (20 characters)

I tried to increase #maxlength with form_alter but this was ignored.

Proposal: let form_alter modify #maxlength. The module could still filter away the brackets etc. and convert the number into some standard format.

scott859’s picture

I believe this has been addressed in the most recent release, 6.x-2.18. Not positive however, I need to update and test.

mikesir87’s picture

I've recently run into an issue here. We've found that we can insert a value of 555-555-5555x1234567, and that works. We have a few clients that have extensions of 5+ digits. This validates, and it displays correctly on output. However, when the node is edited again, it is formatted to (555) 555-5555 x1234567, which on submission is too long, and fails validation. This I feel is a pain, as it forces the end-user to put the phone number back into this format every time. Is it really that important to have the max length on the phone number? Can it be an option, rather than a hard-coded setting?

rlmumford’s picture

I'm running into the same problem on the 7.x-1.x branch. Has any progress been made?