Validation of forms with mailing addresses - do not forget about Hong Kong

    Web has no state borders.

    Nowadays, almost all websites have forms for entering email addresses. Postal addresses are fully or partially required for a wide variety of purposes. And all the difficulties of working with addresses in the web come from the need to ensure the correct work with users from all over the world.

    The simplest example is mailing a product or letter. Also, the address is piped before the goods are dispatched - to calculate the cost of packaging and shipping (packaging and shipping costs). In part, the address is necessary for the correct calculation of taxes when purchasing goods - namely, the percentage of VAT in the USA depends on the state.

    That is, even when the user pays for a product or service, you must know from which country he is and, if it is USA, then from what state he is. It is customary to do this quite simply: if you are from USA - indicate your ZIP / Postal Code.

    Naturally, all developers try to reduce the form of entering the mailing address to a unified form. It’s easier to ask the user a little more than what is really needed than to make various forms or hide / show form elements depending on the situation.

    But this approach has common side effects.

    Do not forget or offend users.

    The most common mistake is to make the Zip / Postal Code input field mandatory.

    That's right - not all countries have a zip code. He is not in Hong Kong. Pay attention to this and maybe you will have more buyers.


    If you suggest users to select a country from the list - do not forget to add Bermuda (Bermuda) there. Yes, they are considered a country and they have zip codes in two different formats.

    It is also worth mentioning that most likely everyone already knows: in different countries postcodes of different formats. There are only numbers, there are letters, there are mixed ones - letters and numbers.

    Also popular now: