Sri Lanka uses a standard 5-digit format where the first two digits represent the province/district and the remaining digits specify the local post office. Proposed Feature: Smart Address Autocomplete
To develop a feature around (often colloquially referred to as "ZIP codes" despite being a 5-digit numeric system), you should focus on a Postcode-to-Location lookup or Address Validation tool. srilankan55zip
Integrate a comprehensive list of Sri Lanka's 500+ post offices. Sri Lanka uses a standard 5-digit format where
Query a local dataset or an API like srilankan-postalcode to match the code to its corresponding city. Query a local dataset or an API like
A simple onChange event listener on the zip code input field to trigger the fetch request.
Instantly update the UI fields for "City" and "District" to reduce user typing effort. 2. Key Mapping Examples Postal Code 00100 Colombo 01 (Fort) 20000 Kandy 80000 Galle 40000 Jaffna 3. Technical Implementation Strategy
Use Regex to ensure the input is exactly 5 numeric digits (e.g., ^(\d{5})$ ).