Skip to content

Commit

Permalink
Refine Austrian rules according to:
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Feb 22, 2014
1 parent 9e01fe8 commit 7dda48d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/phony/countries/austria.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# '1', # Vienna
'89', # Routing Number
'316', # Graz
'463', # Klagenfurt
'512', # Innsbruck
'662', # Salzburg
'732' # Linz
Expand Down Expand Up @@ -49,6 +50,13 @@
'699',
]

mobile_2digit = [
'67',
'68',
'69',
]


service = [
'710',
'711',
Expand Down Expand Up @@ -79,7 +87,8 @@
one_of(service) >> split(9..9) |
one_of(corporate) >> split(5..5) |
one_of(ndcs) >> split(6..6) |
one_of(mobile) >> split(7..7) |
one_of('663') >> split(6..6) | # 6 digit mobile.
one_of(mobile) >> split(7..7) |
one_of(mobile_2digit) >> split(7..7) | # Separate as mobile contains 676 - 67 violates the prefix rule.
fixed(4) >> split(7..7)
end

0 comments on commit 7dda48d

Please sign in to comment.