Its possible to validate your UK Postcodes using a regular expression.

  1. Drag and drop an question node onto the canvas. Specify the type as “text”
  2. Under “Advanced Options” select “Regex”
  3. Copy and paste this regular expression:
([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})

4. Under preview you can test by entering a UK post code

5. To the right you will see either a red failure or green success icon under “Validation”

Leave a Reply

Your email address will not be published. Required fields are marked *