Develop module that handles international number validation
Will White - November 7, 2008 - 23:03
| Project: | SMS Framework |
| Version: | 6.x-1.0-beta1 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | international |
Jump to:
Description
This module will be used by gateway modules to validate international numbers that users input. It should provide a CRUD interface that allows admins to add, remove, edit, enable, and disable individual countries.
Right now users must enter their full international phone number and select their country. We validate the number they provided against the format for the country they provided. Other sites like Twitter don’t have this country drop down. They only ask for a number. We’d like to do this as well.

#1
Will, are you thinking that number validation could be done based on the user's current country? (as reported by Country Code module or similar).
So, it would take numbers like "+447712123123", "00447712123123", "07712123123", "7712123123" and try to format them correctly using some common logic and some country-specific rules.
#2
What's the current status/plans for international number validation? I saw that sms_international module was added and then removed.
#3
Hi mfb,
The sms_international module still exists in the 2.0 branch. Completing a plan for this module and executing it should eliminate several issues and points of confusion with international number handling.
#4
The function sms_formatter kills a lot of New Zealand numbers when it returns FALSE if the number is < 9. I needed to change this to < 7 to work for me. Also, by returning FALSE, it merely kills the number (the number that is then sent is just the country code).