incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn Williams" <i...@tinylion.co.uk>
Subject RE: UK Postcode [OT]
Date Fri, 09 Mar 2012 18:06:03 GMT
Isn’t it fun writing apps for UK :-)

I have lost count of the number of times Ive had to write either phone number and postcode
formatters and validators.

I have no idea about the rest of the world but here in the uk is not very straight forward.

Obviously the rules are there but they are most surely esoteric. :-)

I just finished a month ago writing a uk phone number formatter, that was interesting. The
rules are just about as consistent as the English language itself :-)

I before E expect for all the words were E is before I lol
 
Glenn
tinylion


-----Original Message-----
From: Daniel Harfleet [mailto:dharfleet@yahoo.com] 
Sent: 09 March 2012 16:05
To: justin@classsoftware.com
Cc: flex-dev@incubator.apache.org
Subject: 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


Mime
View raw message