A helpful library that has two modules:
World Places provides geographic information such as countries, provinces within countries, states, etc. It also has flags and other information accessible. World Numbers is a tool to help format and validate phone numbers.