Update vi_VN address provider with current administrative units and postcodes
Author: hmtriiCreated Jul 21, 2026Updated Jul 21, 2026
The vi_VN address provider contains outdated Vietnamese administrative units and postcode data. It also generates limited address formats that do not closely reflect commonly used Vietnamese addresses.
Steps to reproduce
- Create a Faker instance using the
vi_VNlocale. - Generate addresses using
address(),city(),state(), orpostcode(). - Observe the generated administrative units and postcode formats.
Expected behavior
The provider should:
- Use the current 34 provincial-level administrative units.
- Generate valid five-digit Vietnamese postcodes.
- Generate realistic building numbers, sub-streets, streets, communes, cities, and provinces.
- Return postcodes from the appropriate ranges when using
postcode_in_state().
Actual behavior
The provider uses outdated administrative-unit data, generates six-digit postcodes, and supports only basic address formats.
Proposed changes
- Update the province, municipality, abbreviation, and postcode datasets.
- Add generators for building numbers, sub-streets, streets, communes, cities, and provinces.
- Improve complete address formats.
- Expand tests for the new address components and postcode ranges.
References:
- Vietnamese administrative reforms: https://en.wikipedia.org/wiki/2025_Vietnamese_administrative_reforms
- Administrative units: https://github.com/thanglequoc/vietnamese-provinces-database
- Postcodes: https://mst.gov.vn/van-ban-phap-luat/25175.htm
Source: joke2k/faker