Validating uk postcodes
The reason why 'CR0 1DE' doesn't work is because the 'i' needs to be added to the end of the regular expression in order to make it case insensitive - for example: var postcode_regex = /[A-Z][0-9][0-9A-Z]? W1T 1PG), and it's inconsistent in that it matches some postcodes with a space and some without.This ex is for email verification, you just need to replace str Regex value and need to pass your textbox value to the method.Fox Stuff is maintained by Mike Lewis Consultants Ltd. Feel free to download and use any code or components, and to pass around copies of the articles (but please do not remove our copyright notices or disclaimers).sorry don't know how to tag the script Option Base 1 ' Function PCode(PCin) As String Dim l As Integer PCin = UCase(Worksheet Function.
I checked the above code with the source and typed it into my programme (see below) when I tried to run the programme it came up with 54 errors. namespace Moondog_odering_system EDIT(based on comment):: You can add call below method on textbox leave event or on form submit.We would very much like to help you with your query, however you need to include code tags around your code. Posting code between [CODE]Please [url=https:// or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.