Hi ,I added the Austrian phone number to the module (local here).
How can I send you a patch?
I added the phone.at.inc as file attachment, you also have to update the countries.txt (add line "at => Austria"), and the phone.module (add line "'at' => 'Austria',").

it is a very basic regex, but should work.
Cheers, Christian

Comments

steinmb’s picture

Pls. make a patch by following http://drupal.org/node/707484. It is the quickest way of getting your stuff into a drupal module but also best practice.

mgifford’s picture

Isn't this supposed to be against this file here - http://drupalcode.org/project/phone.git/blob/refs/heads/7.x-1.x:/include...

Not sure what phone.at.inc is other than perhaps a typo.

steinmb’s picture

Wrong country :) (Bush jr. also did this) Let's roll this (untested).

steinmb’s picture

Assigned:droetker» Unassigned
fago’s picture

Status:Needs review» Needs work

patch file is empty.

fago’s picture

Status:Needs work» Needs review
StatusFileSize
new2.61 KB

took the include, cleaned some code style only and rolled a proper patch. Also sorts countries so it's easier to find.

fago’s picture

>Not sure what phone.at.inc is other than perhaps a typo.

lol. Yeah, austria != australia!

fago’s picture

StatusFileSize
new2.66 KB

Turned out the swiss regex break some Austrian numbers. Attached patch fixes that for me and cares for formatting prefixes with different lengths accordingly (4 digit mobile numbers, vs 5 digits others).

steinmb’s picture

Ooobs, posted the wrong patch in #3, I'm such a moron :)

fago’s picture

#8 works well for me. Any reviews or other testers?

rfsbsb’s picture

The valid_at_phone_number function has a comment pointing to a Wikipedia page referenced to Switzerland phone number and not to Austria. It sounded a little bit awkward to me. Does the two countries use the same system? Maybe this document https://www.rtr.at/en/tk/E129 can help clarify.

Anyway, the patch apply and the validation works. If someone confirms it's okay for Austrian validation and format, we can commit the patch.

smilne23’s picture

Not sure if related, but currently cannot add a mobile phone number EG: 0400 123 456, only land line numbers EG: (03) 9123 4567.

Update: 0499 123 456 is rejected but 0409 123 456 is accepted. 0499 xxx xxx is a valid australian mobile number.

smilne23’s picture

Priority:Normal» Major
rfsbsb’s picture

Priority:Major» Normal

Hi @smilne23 can you add more details to my question in comment number 11? I guess the patch would fix your problem, but I must confirm these questions before commit the patch.

smilne23’s picture

Hmmm, my bad ... misread Austrian as Australian. I'm down under. I'll create a new issue.

droetker’s picture

StatusFileSize
new2.63 KB

I corrected the link to the Austrian Wikipedia site.