开发者

address validation global solution

开发者 https://www.devze.com 2023-03-05 12:19 出处:网络
suppose user fillup form with germany address but as country choose UK. so how can i validate address there like if user choose country UK then i want that user has to write UK address 开发者_运维问答

suppose user fillup form with germany address but as country choose UK. so how can i validate address there like if user choose country UK then i want that user has to write UK address 开发者_运维问答for other detail. how to do it for all country. is there any IP available. need idea. thanks


Without full details of the formats of addresses of both countries (and if you have to support more, your would need the details of each country), you will not be able to validate properly.

Even with this detail, some countries will have such similar formats that you will not be able to tell which one the address belongs to.

Your best bet is to use an address verification library/service.


Here is a link that describe a lot of international postal address formats: International Mailing Address Formats

Otherwise, there are companies that make a business out of this process (technically, they propose Web Services for this).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号