 		# And: 9898-6565
 		@LOCAL = 2
 
+	validateInternational: (originalNumber, givenCountryCode, givenNationalDestinationCode) =>
+		number = originalNumber
+		number = @normalize(number) # Clean up number
 
-	validateInternational: (originalNumber) =>
-		number = originalNumber
-
-		# Clean up number
-		number = @normalize(number)
-
-		for countryCode, countryObj of vtex.phone.countries
-			countryCodeRegex = new RegExp "^"+countryCode
-
-			if countryCodeRegex.test(number)
-				withoutCountryCode = number.replace(countryCodeRegex, "")
-				foundCountryCode = true
-				break
+		if givenCountryCode
+			countryCode = givenCountryCode
+			[foundCountryCode, countryCodeRegex] = @testCountryCode(countryCode, number)
+		else
+			for countryCode, countryObj of vtex.phone.countries
+				[foundCountryCode, countryCodeRegex] = @testCountryCode(countryCode, number)
+				break if foundCountryCode is true
 
 		if foundCountryCode
-			for nationalDestinationCode in countryObj.nationalDestinationCode
-				ndcPattern = "^("+countryObj.optionalTrunkPrefix+"|)"+nationalDestinationCode
-				ndcRegex = new RegExp ndcPattern
+			withoutCountryCode = number.replace(countryCodeRegex, "")
+			countryObj = root.vtex.phone.countries[countryCode]
 
-				if ndcRegex.test(withoutCountryCode)
-					withoutNDC = withoutCountryCode.replace(ndcRegex, "")
-					foundNationalDestinationCode = true
-					break
+			if givenNationalDestinationCode
+				nationalDestinationCode = givenNationalDestinationCode
+				[foundNDC, ndcRegex] = @testNDC(nationalDestinationCode, countryObj, withoutCountryCode)
+			else
+				for nationalDestinationCode in countryObj.nationalDestinationCode
+					[foundNDC, ndcRegex] = @testNDC(nationalDestinationCode, countryObj, withoutCountryCode)
+					break if foundNDC is true
 
-		if foundNationalDestinationCode
+		if foundNDC
+			withoutNDC = withoutCountryCode.replace(ndcRegex, "")
+
 			phoneNumber = countryObj.specialRules(originalNumber, withoutCountryCode,
 												withoutNDC, nationalDestinationCode)
 

	normalize: (number) =>
		# Remove whitespaces, parenthesis, slashes, dots, plus sign and letters
		return number.replace(/\ |\(|\)|\-|\.|[A-z]|\+/g, "")

	format: (phone, format = vtex.phone.INTERNATIONAL) =>
		if vtex.phone.countries[phone.countryCode].format


class Phone
	constructor: ->
		# Like so: +55 21 9898 6565
		@INTERNATIONAL = 0

		# Like so: (21) 9898-6565
