Country/City/state validation

12,682

Solution 1

If you want to make it easy for foreigners to enter an address, then please simply offer a text field, where the address can be entered as formatted text. Very few countries are using a state (or something similar) as part of the address and I don't understand why you want to offer a drop-down list with cities. A list of German cities (or more correct, valid place names in a postal address) would contain some 23,000 entries. What do you think is more easy, enter the address or try to find the place name in such a list_

Solution 2

What we do is use ServiceObjects.com to validate the address.

So we let the user enter their address in a plain text field (more or less), and then simply send the address details to ServiceObjects.com and use the normalized/corrected address returned by their webservice.

This isn't directly answering your question, but perhaps it provides an alternative solution to the root problem.

Share:
12,682
fill_J
Author by

fill_J

Strongly focused on creating user centric applications to streamline the user experience and remove unnecessary complexity. Intent upon building for the future by making applications that are solidly built, scale well, and self-sustaining. Responsibilities and duties that I performed and capable of: Analyze, design, develop, and maintain products and assist in commercialization. Ensure product code and artifacts are managed according to guidelines. Assist in identifying and organizing requirements and producing specifications. Apply usability procedures and principles as defined. Build prototypes, products, and systems for testing. Design testing procedures. Document test results and develop client presentation. Develop and execute unit tests to ensure and maintain source code quality. Provide timely corrective actions on all assigned defects and issues. Create and maintain product documentation. Provide support for and prepare technical documentation. Share expertise throughout the organization. Continually evaluate engineering approaches and risks and make improvements. Assist in cost estimates.

Updated on June 28, 2022

Comments

  • fill_J
    fill_J almost 2 years

    I want to do the following things using PHP and jQuery

    https://www.careerbuilder.com/share/register.aspx?sc_cmp1=JS_LoginASPX_RegNow

    Steps

    1. Select a country from a dropdown list.
    2. The city dropdown list will fillup automatically with the list of cities of the selected country.
    3. If state is available for that country then state list will be visible with all state list of that country.

    Then I need to validate the selected city, state and country.

    Do you have any ideas?

    Thanks in advance

  • fill_J
    fill_J over 14 years
    Thanks abel for your nice suggestion. i have very near to a solution. as soon as i done with that, i will post it here. thanks once again.
  • Alex
    Alex about 6 years
    This is neither PHP nor JQuery. Please read stackoverflow.com/help/how-to-answer.