Message 68839

Message id


Currently we're using is_valid_number to validate the phone number in the contact mechanism.

In the case of France a cellular phone which has a phone number from one of the DOM-TOM has a French-looking phonenumber but is in reality issued a number from this area (+590 instead of +33). What happens is that people move and their address is now in France.

The way we validate the phone number is by using the country code of the address of the party. And in this case it will fail because the country should be "Guadeloupe" (code 'GP').

I see different ways in which our way of validating the phone numbers this could fail:

  • the case I just explained (in which someone moved from Guadeloupe to France)
  • a user encodes someone in Guadeloupe and using "France" as the country (because they don't know they should put Guadeloupe for the phone validation to work)

I think we could use is_possible_number instead of is_valid_number. The documentation says:

  Instead of returning the reason for failure, this method returns true if
  the number is either a possible fully-qualified number (containing the area
  code and country code), or if the number could be a possible local number
  (with a country code, but missing an area code). Local numbers are
  considered possible if they could be possibly dialled in this format: if
  the area code is needed for a call to connect, the number is not considered
  possible without it.

After all if the number is diallable, it could be enough for us.

Date User Action Args
2021-07-12 15:10:37nicoesetmessageid: <>
2021-07-12 15:10:37nicoelinkissue10574 messages
2021-07-12 15:10:37nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)