Brian Dunning's FileMaker Custom Functions

ValidateUKPostcode

UK Postcode Validation

  Average rating: 4.4 (26 votes) Log in to vote

ThomasSeidler   ThomasSeidler - Show more from this author
The Good Book Company Ltd
http://www.thegoodbook.co.uk

Share on Facebook Share on Twitter

  Sample input:
ValidateUKPostcode( "WC1A 1AA")
ValidateUKPostcode( "XX1 Y8A")
  Sample output:
1
0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Validates UK postcode by crude rule base provided in Wikipedia

[updated to make sure it worked!! :)]

 

Comments

Tom Hames   Tom Hames, B&P Fabrications
Apr 18, 2019
Hi there,

I have Copied your link and pasted into functions, with the Parameter "FilterC", however when I click ok it says it is expecting A number, A Text Constant etc and is highlighting the first bracket. Any Clues?

Let ( [
_postcode = FilterC ( Upper(_postcode) ; "AZ09" ) ;
 
Tom Hames   Tom Hames, B&P Fabrications
Apr 18, 2019
The first bracket after "FilterC"
 
Tom Hames   Tom Hames, B&P Fabrications
Apr 18, 2019
The first bracket after "FilterC"
 
Ben   Ben, realseeds
Feb 13, 2024
BEWARE! Before you waste any time on it, I'm not sure what is up with this function, but as of 2024 it is not valid filemaker code.
There is an error in the first line there should not be a C after the word filter.
But even so, for me the filter command does not work as specifying AZ09 but needs abcdefghijklmnopqrstuvwxyz0123456789 specified
And the command NumInRange does not appear to be valid filemaker syntax either.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: