#2432·faker

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

  1. Create a Faker instance using the vi_VN locale.
  2. Generate addresses using address(), city(), state(), or postcode().
  3. 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: