Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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"
Comment | File | Size | Author |
---|---|---|---|
#4 | 1039220_4.patch | 1.03 KB | GiorgosK |
#3 | 1039220_3.patch | 1.01 KB | GiorgosK |
#3 | phone.el_.inc_.txt | 1.39 KB | GiorgosK |
Comments
Comment #1
GiorgosKthis might be relevant #831220: Greek phone numbers
Comment #2
GiorgosKIf 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
Comment #3
GiorgosKhere 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
Comment #4
GiorgosKcorrected error message in patch (nothing functional changed)