In my new project I am providing user an edittext where he has to put a zip code, i have to check if this provided zip code is valid for Australia or Not. I am getting so much suggesions, but I need the easiest and simplest one. Moreover it would be the best If I could find a webservice from where I could check this.
Share
First of all I don’t live in Australia but Wikipedia says:
Why don’t you just test your zipcode against a Regular Expression that describes this (simple) pattern?
I suggest you to read the allocation rules for the zipcodes and see whether there are contiguous or if there are non valid zipcodes inside a given range…
Now if you don’t want to reinvent the wheel, I guess you can use geocoding APIs the Google Geocoding API or Yahoo! Placefinder API. The implementation could be simple: send the postcode (I suppose you could be allowed to send only this information) and check in the response whether the country is Australia or not.