Postal code is a unique data more helpful to track any address. But in customer / vendor Master data often either user skips this fields or fill something irrelevant if it supposed to be mandatory. To create a validation rule for postal code I suggest a simple solution which an ABAPER can do without much effort.
The first 2 digit of the postal code represents the State as given below :
First 2 | Circle |
11 | Delhi |
12 and 13 | Haryana |
14 to 16 | Punjab |
17 | Himachal Pradesh |
18 to 19 | Jammu & Kashmir |
20 to 28 | Uttar Pradesh and Uttaranchal |
30 to 34 | Rajasthan |
36 to 39 | Gujarat |
40 to 44 | Maharashtra |
45 to 49 | Madhya Pradesh and Chattisgarh |
50 to 53 | Andhra Pradesh |
56 to 59 | Karnataka |
60 to 64 | Tamil Nadu |
67 to 69 | Kerala |
70 to 74 | West Bengal |
75 to 77 | Orissa |
78 | Assam |
79 | North Eastern |
80 to 85 | Bihar and Jharkand |
90 to 99 | Army Postal Service (APS) |
Except 90- 99 all the ranges are possible values in postal code. The “ Region” field is used to capture the State. The Pincode already entered by user can be verified by the Region selected by the user .
For example
First 2 digit of Pincode 60,61,62,63,64 are possible values for Region = 22 ( ie. Tamilnadu )
This simple validation will be more useful even though not cent percent accuracy to some extent validate the data entered.
I invite all to improve the validation further towards more accuracy.
Selvakumar.N