Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Even with "Add the country code if not filled by the user" un-checked the default code is added to numbers where the country code has been omitted. This isn't expected functionality so I presume it's a bug?
Comment | File | Size | Author |
---|
Comments
Comment #1
rfsbsbThis setting isn't yet properly configured for all countries, can you please tell which countries have you tested and got this bug?
Comment #2
dddbbb CreditAttribution: dddbbb commentedIf I add a UK number (mobile or non-mobile) without the country code (e.g. 01460xxxxxx ) the module still seems to convert it to +1 1460xxxxxx even with the 'Add the country code if not filled by the user' check box unchecked (I have '1' as the default code below that check box).
Comment #3
rfsbsbAre you using the formatter/validator for Great Britain or international? If you will only accept Great Britain phones, you should use this formatter/validator.
Here's a screenshot...
Comment #4
dddbbb CreditAttribution: dddbbb commentedI'm using International. I just gave Great Britain as an example.
Comment #5
hawkeye.twolfI can also replicate this issue. I started writing a patch for it but it became more involved than I have time for right now. Unfortunately, some of the internal handling of international numbers requires the "+" prefix, so leaving it off is not an option unless other parts of the module are changed.
If country code is to be required, I recommend adding a check in the element validator rather than prepending a plus sign with no country code.
Comment #6
DamienMcKennaThis is being solved in #2186331: phone_field_presave() calls format_phone_number(), breaking input data integrity.