#7960 clean_phone_number function is too eager to prepend 1-

v1.3.2
closed
General
2015-08-24
2015-08-11
No

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.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2015-08-12
    • status: open --> review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-12

    db/7960

     
  • Igor Bondarenko - 2015-08-13
    • Reviewer: Igor Bondarenko
     
  • Igor Bondarenko - 2015-08-13

    Looks good! One minor issue, though. The edge of the overlay cuts out a part of submit button with long error message (see attachment).

     
  • Igor Bondarenko - 2015-08-13
    • status: review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-13
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-13

    fix in forge-classic:db/7960 (it only is needed there, and best way to tighten things up was there too)

     
  • Igor Bondarenko - 2015-08-13
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2015-08-24
    • labels: phone, sf-current, sf-1 --> phone, sf-1
     
  • Dave Brondsema

    Dave Brondsema - 2015-12-08
    • Milestone: unreleased --> v1.3.2
     

Log in to post a comment.