eufemia
eufemia copied to clipboard
fix(Value.PhoneNumber): displays country code using prefix `+` instead of `00`
This PR makes it so we display +47
instead of 00 47
when using Value.PhoneNumber for values like +47 93086048
.
I think the reason why it displays 0047 rather than +47 in main today is because of back in the days we only had Norwegian numbers and probably no country code. So then it worked.
See CSB for how it works/looks on main today
See CSB for how it looks in this PR
There's a lot more work that needs to be done to support displaying/formatting phone numbers from all countries we support in Field.PhoneNumber. As there's different ways of formatting the country code based on the country, and also different ways of formatting the number based on the country. I believe this PR/fix is sufficient for now(mainly Norwegian, which is our main use case).