here is the steps to reproduce

I tried it with greek phone numbers
checked Add the country code if not filled by the user

create node
type in "22710 00000"
save node
edit node
phone is "+30 22710 00000"
save node
phone now is "+30+30 22710 00000"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GiorgosK’s picture

this might be relevant #831220: Greek phone numbers

GiorgosK’s picture

If you ask me the logic of each country should be done by core
and only validation should be done by the country code

complementary idea is to #174262: Store raw number in database, format on ouput

GiorgosK’s picture

Status: Active » Needs review
FileSize
1.39 KB
1.01 KB

here is a patch that works in my case
accepts +30 9999999999 and 9999999999 formatted numbers

while not complete its acceptable for me
(I don't have a big experience with regular expressions to accommodate other formats)

I am also attaching the modified phone.el.inc for easy testing
rename phone.el_.inc_.txt to phone.el.inc and put in the phone folder and accept overwriting old file

GiorgosK’s picture

FileSize
1.03 KB

corrected error message in patch (nothing functional changed)