Questions tagged [postal-code]

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

A postal code is a series of letters and/or digits which is useful to identify the a particular region within a postal address. Once postal codes were introduced, other applications became possible.

In February 2005, 117 of the 190 member countries of the Universal Postal Union had postal code systems. Countries that do not have national systems include Ireland and Panama. Although Hong Kong and Macau are now Special Administrative Regions of China, each maintains its own long-established postal system, which does not utilize postal codes for domestic mail, and no postal codes are assigned to Hong Kong and Macau. Mail between Hong Kong, Macau and mainland China is treated as international.

399 questions
1
vote
1 answer

Set a minimum order amount for specific postcodes in WooCommerce

The following code based on an official code snippet from WooCommerce set a minimal required total amount, to be able to checkout: add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); add_action( 'woocommerce_before_cart' ,…
ECDJ
  • 79
  • 8
1
vote
1 answer

Flutter Firebase Realtime database with UK postcode distance search

I am trying to build a basic Flutter app where people can swap items (kind of like the Olio app) but I am getting stuck with regards to listings where they only show within a certain radius. User 1 uploads details of the item they wish to swap (this…
teh_raab
  • 384
  • 1
  • 3
  • 21
1
vote
0 answers

International Postal Code Validation

Possible Duplicate: What is the ultimate postal code and zip regex? Is there a well-defined set of regexes for validating international postal codes? I have 52 different countries that I have to validate against, so I was hoping someone already…
Mark Richman
  • 28,948
  • 25
  • 99
  • 159
1
vote
3 answers

php extract UK postal code and validate it

I have some text blocks like John+and+Co-Accountants-Hove-BN31GE-2959519 I need a function to extract the postcode "BN31GE". It may happen to not exist and have a text block without postcode so the function must also validate if the extracted…
Michael
  • 6,377
  • 14
  • 59
  • 91
1
vote
1 answer

Changing Postcode field in Woocmmerce's checkout page to drop-down

I am having post code based minimum order amount for orders for my Woocommerce shop. Also I am having postcode based custom error messages to appear once the user type postcode like how much he needs more to checkout. So preventing the user to type…
Tom
  • 87
  • 1
  • 9
1
vote
3 answers

How to extract UK postcodes from an address column in a pandas DataFrame?

I have a DataFrame that contains information, in particular addresses like the DataFrame below: col1 col2 0 1303 674 Yellow Gardens,Tunbridge Wells, Kent TN5 4NP 1 1205 154 Coller Crescent Runcorn,Cheshire WP6 4TY 2 1504 122 Uphill…
Philip09
  • 85
  • 9
1
vote
2 answers

Force WooCommerce postcode field into CAPS when input

How can I to force the input of the postcode field in WooCommerce account page into upper case, so if someone inputs rh12 3uc it makes it into RH12 3UC?
1
vote
6 answers

Building postcode address lookup based on Royal Mail PAF Raw data

I am working on custom build software for postcode lookup based on Royal Mail PAF data. Main purpose of that software is to replace Quick Address (Third party software vendor). I have a few questions How come Quick Address data files including…
Leo
  • 1,547
  • 3
  • 24
  • 40
1
vote
2 answers

How to implement finding the nearest UK postcodes from a given post code with distance?

I've got a requirement to find the nearest n postcodes from a given post code. Could any one guide me in finding the nearest UK postcodes from a given post code with distance
Harun
  • 5,109
  • 4
  • 38
  • 60
1
vote
0 answers

Javascript to validate US postal code in HTML text input

I have some javascript code that is trying to verify if the input of a text input box matches the format of US postal codes. There's a div block below the input box that will either contain "This is an invalid US postal code" in red or the opposite…
Luv Tomar
  • 127
  • 2
  • 13
1
vote
1 answer

Google places API doesn't return postal codes for large cities or centres. How do I get around that?

I'm utilising google autocomplete to allow visitors to enter towns, suburbs or postcodes, so that they can select the right one from the autocomplete list. I then need to store the postcode for that location so that I can compare that postcode to…
CraigD
  • 119
  • 1
  • 10
1
vote
2 answers

Splitting Post Codes from a List

I have a got a list of Post Codes that I would like to return just the first part of it. postcodes = list(df['postcode'][0:10]) ['EC4V 3EJ', 'SE1 9DW', 'W12 7EY', 'E14 9GA', 'E17 8ES', 'N10 3LR', 'W2 2RH', 'W3 7ST', 'W2 1PW', 'W4 5RG'] for p in…
1
vote
3 answers

UK Postcode look up by street, on a budget of £0.00

I'm planning a site which will need to have the ability to search for an address using partial details, like street name. Addresses are integral to the whole working of the app. Does anyone have any suggestions how I can manage this, given how the…
Paul
  • 1,519
  • 1
  • 16
  • 26
1
vote
2 answers

Pandas - using PostCoder to lookup Latitude & Longitude in each row, then return Postcode in new columns

I want read two columns (Latitude & longitude) from my dataframe df1 in pandas and create a new column zipcode and add zipcode at each row in the dataframe. I think this webpage is useful: https://postcodes.readthedocs.io/en/latest/ df1 =…
Ashish
  • 63
  • 5
1
vote
3 answers

Postcode proximity search

I have about 20 events (UK based if that makes a difference). I will also have a form on a page where people can register their interest in attending one of these events. After they have submitted this form, they will be shown the location of the…
Tom
  • 12,776
  • 48
  • 145
  • 240