Search code examples
javapostal-code

Postal-code validator for all countries in the world in Java


Want solution in Java which does the following:

Input :

  1. Locale code (Example: "en_US")
  2. Postal code(Example: "NH 3301") --> Valid

Similarly for any other country in the World, it should validate the corresponding Postal code.

Is there any Library for accomplishing this?


Solution

  • You can go for GeoNames .
    It provides us geographical database containing millions of placeholders and it covers almost all countries.
    Hope this helps.
    Comment if further help is required.