ValidateUKPostcodeFormat ( _postcode )
Checks whether a string is a valid UK postcode format. A fixed version of function "ValdidateUKPostcode" by Thomas Seidler
Be the first to rate this function Log in to vote
Ben - Show more from this author
realseeds https://www.realseeds.co.uk |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
I found on here a script by Thomas Siedler "ValidateUKPostcode" which looked awesome - but it had several syntax errors in it and did not work in FM19, not sure it could have ever worked as published as the case statement was missing its final value declaration, and a couple of functions appeared not to be filemaker syntax . .. I have fixed these errors and it appears to work now.
Caveat - I say 'appears' because I have not exhaustively checked the logic of the postcode matching algorithm, just fixed the code so it will run. However, applying it on our database of 188,000 customers correctly identified 1,300 with bad UK postcodes, so I am happy using it.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.