Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top