Вопрос

I have validated UITextfield to enter numbers only as well as limited to 5 digits. But how can i check whether the entered 5 digit code is a valid US zip code or not? Can someone provide a code/sample app which performs this functionality?

Это было полезно?

Решение

You can look here http://www.populardata.com/zipcode_database.html and can download the list of U.S zip code the data is in CSV format but can be converted easily in to xml then you can include the xml in to your project and compare every time you need to with the xml file through various parsing methods.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top