Bug 858330 - PhoneNumberJS: Fix chilean mobile numbers. r=bent

This commit is contained in:
Gregor Wagner 2013-04-04 17:39:57 -07:00
parent a92a872e72
commit 37faeec637
2 changed files with 7 additions and 1 deletions

View File

@ -346,7 +346,7 @@ this.PhoneNumber = (function (dataBase) {
if (md.nationalPrefixForParsing) {
// Some regions have specific national prefix parse rules. Apply those.
var withoutPrefix = number.replace(md.nationalPrefixForParsing,
md.nationalPrefixTransformRule);
md.nationalPrefixTransformRule || '');
ret = ParseNationalNumber(withoutPrefix, md)
if (ret)
return ret;

View File

@ -277,6 +277,12 @@ Format("0577-555-555", "IT", "0577555555", "IT", "05 7755 5555", "+39 05 7755 55
// Telefonica tests
Format("612123123", "ES", "612123123", "ES", "612 12 31 23", "+34 612 12 31 23");
// Chile mobile number from a landline
Format("0997654321", "CL", "997654321", "CL", "(99) 765 4321", "+56 99 765 4321");
// Chile mobile number from another mobile number
Format("997654321", "CL", "997654321", "CL", "(99) 765 4321", "+56 99 765 4321");
// Dialing 911 in the US. This is not a national number.
CantParse("911", "US");