Mexican phone numbers are like (XX) XXXX XXXX.

Comments

thierry_gd’s picture

Status: Active » Needs work

Could you provide a list of different valid and invalid numbers including or not the country code

alexanderpas’s picture

Phone numbers in Mexico are made of ten digits with either two-digit area codes (for Mexico City, Guadalajara, and Monterrey and their respective metropolitan areas) or three-digit area codes for the rest of the country.

However, it seems that they have some weird scheme going on there.

http://en.wikipedia.org/wiki/Telephone_numbers_in_Mexico

scottalan’s picture

StatusFileSize
new2.23 KB
new2.74 KB
new3.24 KB

I needed to validate a custom webform field and I was already using this module to handle other validation for cck fields so I went ahead and started patching the module for 'Mexico'. I only added what was necessary for my use case so it is incomplete. Nonetheless I thought I would post it here and maybe someone could complete it.

melonangie’s picture

Issue summary: View changes
StatusFileSize
new339 bytes
new4.96 KB

I updated the .inc file to format numbers like (xx) xx-xx-xx-xx or (xxx) xxx-xxxx. And update the patch to work in the current 7.x-1.0-beta1, 7.x-1.0-dev or 7.x-1.x branch.