You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Daniel Harfleet <dh...@yahoo.com> on 2012/03/09 17:04:40 UTC
UK Postcode
Hi Justin,
I know you were looking at UK postcodes for a while, in respect to validation, I have noticed that there are a few very specific rules over and above just being only a letter or only a number. I am guessing this could be dealt with overriding the 'extraValidation' function.
http://interim.cabinetoffice.gov.uk/govtalk/schemasstandards/e-gif/datastandards/address/postcode.aspx
"
* The letters Q, V and X are not used in the first position.
* The letters I, J and Z are not used in the second position.
* The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W.
* The only letters to appear in the fourth position are A, B, E, H, M, N, P, R, V, W, X and Y.
* The second half of the Postcode is always consistent numeric,
alpha, alpha format and the letters C, I, K, M, O and V are never used.
These conventions may change in the future if operationally required.
*GIR 0AA is a Postcode that was issued historically and does not
confirm to current rules on valid Postcode formats, It is however, still in use.
"
I think there are a few places on the web where you can find regular expressions specifically for this.
hth
dan