File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 229229 # Colombia.
230230 # http://www.itu.int/oth/T020200002C/en
231231 country '57' ,
232+ match ( /\A (1800)\d +\z / ) >> split ( 3 , 4 ) | # toll free 1800 numbers
232233 match ( /\A (3\d \d )\d +\z / ) >> split ( 3 , 4 ) | # mobile (300 310 311 312 313 315 316)
233234 match ( /\A (60\d )\d +\z / ) >> split ( 3 , 4 ) |
234235 fixed ( 1 ) >> split ( 3 , 4 )
899900 # https://www.numberingplans.com/?page=plans&sub=phonenr&alpha_2_input=EC¤t_page=1
900901 # https://en.wikipedia.org/wiki/Telephone_numbers_in_Ecuador
901902 country '593' ,
903+ match ( /\A (1800)\d +\z / ) >> split ( 3 , 3 ) | # toll free 1800 numbers
902904 one_of ( '9' ) >> split ( 4 , 4 ) |
903905 match ( /\A ([\d ]{2})\d {7}\z / ) >> split ( 3 , 4 ) |
904906 fixed ( 1 ) >> split ( 3 , 4 )
Original file line number Diff line number Diff line change @@ -188,14 +188,16 @@ def self.it_is_correct_for(country_name, options = {})
188188 expect ( Phony ) . to be_plausible ( '+359 999 123456' )
189189 end
190190
191- it_is_correct_for 'Colombia' , samples : [ '+57 601 411 1899' ,
191+ it_is_correct_for 'Colombia' , samples : [ '+57 300 111 2222' ,
192+ '+57 601 411 1899' ,
192193 '+57 602 111 2222' ,
193194 '+57 603 111 2222' ,
194195 '+57 604 111 2222' ,
195196 '+57 605 111 2222' ,
196197 '+57 606 111 2222' ,
197198 '+57 607 111 2222' ,
198- '+57 608 111 2222' ]
199+ '+57 608 111 2222' ,
200+ '+57 1800 111 2222' ]
199201 it_is_correct_for 'Congo' , samples : '+242 1234 56789'
200202 it_is_correct_for 'Cook Islands' , samples : '+682 71928'
201203 it_is_correct_for 'Costa Rica' , samples : '+506 2 234 5678'
@@ -240,6 +242,7 @@ def self.it_is_correct_for(country_name, options = {})
240242 expect ( Phony ) . to be_plausible ( '+593 7 400 0000' )
241243 expect ( Phony ) . to be_plausible ( '+593 7 600 0000' )
242244 expect ( Phony ) . to be_plausible ( '+593 9 0000 0000' ) # mobile
245+ expect ( Phony ) . to be_plausible ( '+593 1800 000 000' ) # toll free
243246 end
244247
245248 it_is_correct_for 'Equatorial Guinea' , samples : [ '+240 222 201 123' ,
You can’t perform that action at this time.
0 commit comments