I found the following bug:
I created a phone field of type "Phone Numbers - South Africa"
but when I added a phone number, I get the following error message:

082 123 12345" is not a valid Swedish phone number! South African phone numbers should ....

On other issue, I would like to allow to users to enter spaces between the area code / exchange. You could possibly filter them out upon saving?

CommentFileSizeAuthor
#7 phone.za_.inc_.patch820 bytesmgifford
#6 phone.za_.inc_.txt1.98 KBnorio

Comments

wavesailor’s picture

Not sure how to patch it but the problem is on line 305 of the file phone.module : "Swedish" should be replaced by "South African"

And the format for South African Telephone numbers is as follows:

    Country Code: +27
    Area Code: 2-5 digits
    Subscriber Number: 3-7 digits
    Trunk Prefix: 0
    International Prefix (out-dialling): 00
    Sum of Area Code and Subscriber Number will be 9 digits (exclusive of trunk prefix).
wavesailor’s picture

Another problem is when I save the phone number entered as 082 123 1234
it is displayed (and saved?) as 82 123 1234-82- which is not correct.

FYI: I also found that on line 13 of the file phone.za.inc there is a reference to Czech which should be South African

thierry_gd’s picture

Status: Active » Fixed

Taken into account in 6.2.18 release

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

norio’s picture

Version: 6.x-2.17 » 7.x-1.x-dev
Status: Closed (fixed) » Active

This is not fixed. It still displays the telephone number incorrectly (it's missing the first '0') and the error message doesn't describe how South African numbers should be formatted.

norio’s picture

StatusFileSize
new1.98 KB

I've attached an improved phone.za.inc. If someone ELSE wants to create a patch from it, that'll be great. Otherwise, just copy this into the includes folder of the phone module now & each time you update the phone module to fix this issue. (Rename it to phone.za.inc)

mgifford’s picture

StatusFileSize
new820 bytes

Which is just this patch here, right?

cweagans’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.