mirumee / google-i18n-address

Google's i18n address data packaged for Python.
BSD 3-Clause "New" or "Revised" License
138 stars 51 forks source link

Validating postal addresses #64

Closed Jimchoo91 closed 1 year ago

Jimchoo91 commented 2 years ago

Hi, I had a question about this library. It is possible to validate a postal address without being able to provide all of the rest of the information? For example, let’s say I am able to provide the country and region but nothing else, or I am I only able to provide the country and street?

thanks

artursmet commented 2 years ago

Hi @Jimchoo91, It depends on the country in general, however the vast majority of country validation rules I have seen, is about validating the format of the postal codes. Each country has a dedicated formatting rules for the postcodes, additionally some of the countries require administrative area code to be provided, like state in the USA.

This library is not able to validate addresses on street level.

rafalp commented 1 year ago

Closing this as won't fix. Artur's explanation is good, but you can also see my explanation in other issue for the reasons why this is not really something that could fit into library.