Research about the different postal code format for the different countries to be used in the application. it’s required to create regular expression to validate the postal code for each country.
- Afghanistan postal codes are four digits (NNNN). The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99).
Example: 1001
Mr Ahmad Towheed Street, House No. 240 Kabul 1001 AFGHANISTAN
- Indian postal codes are six digits. The first digit represents the region in India. The second digit is the sub-region, while the third digit is the sorting district. The last three digits represent the particular post office within the district.
Example: 110001
Mr I.K. Taneja Flat No.100 Triveni Apartments Pitam Pura NEW DELHI 110034 INDIA
- A United States postal code, it included the five digits of the ZIP Code, followed by a hyphen and four digits that designated a more specific location.
Example: 10001-1234
Embassy of the United States of America 9000 New Delhi Place Washington, DC 20521-9000[22]
- 5 digits to the right of the locality followed by 4 digits giving additional building information, separated by a dash.eg: The first digit represents the postal region,the second digit represents the sector,the third digit represents the branch,the fourth digit represents the section,the fifth digit represents the block,and the last four digits represent the extended postcode.
Example:- 12233 - 7318
Mr. Abdullah Nasser 3909 Abdullhamid Alkatib ST, Azahrah Dist. RIYADH 12987 - 7318 SAUDI ARABIA
The postal codes in South African consist of four digits.
Example: 2190
47 Rockey Street YEOVILLE 2198
- The UK postcode consists of five to seven alphanumeric characters which was created by Royal Mail. A full postcode designates an area with multiple addresses or a single delivery point.
Example: SW1A 2AA
Singapore postal codes are six digits. The first two digits represent the district, while the last four digits represent the street.
Example: 059532
Ms. Tan Bee Soo 16 Sandilands Road SINGAPORE 546080 REP. OF SINGAPORE
The postal codes in Pakistan consist of 5 digits. The first two digits represent the routeing district, the last three digits represent the post office.
Example: 44000
Pakistan Museum of Natural History Garden Avenue Shakarparian Islamabad 44000 PAKISTAN