---
** [tickets:#7960] clean_phone_number function is too eager to prepend 1-**
**Status:** open
**Milestone:** unreleased
**Labels:** phone sf-current sf-1
**Created:** Tue Aug 11, 2015 07:53 PM UTC by Dave Brondsema
**Last Updated:** Tue Aug 11, 2015 07:53 PM UTC
**Owner:** nobody
`clean_phone_number` will prepend 1- to any 10-digit number, in an attempt to
help fix a US number that is missing the international prefix. However, there
are valid 10-digit numbers that aren't US numbers, they are complete numbers
including prefix for their own country.
One idea to make it better would be to not do the "1-prepend" to a number if it
starts with "+" already (since that indicates a country code is included).
Another option is to not do the "1-prepend" at all, and when the service
provider comes back with an error, then we suggest to the user that they might
need to prepend "1-" if they are entering a US number.
---
Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.