Help required please as I'm unable to figure out where to control this limit.

Within a new shipping method, 'customer' conditions tab, "Limited by postcode" under territory.

I've just created a regular expression for all the ranges of UK postal codes commonly not served on a standard rate by many of the popular United Kingdom couriers (i.e. Highlands, Islands and BFPO) The smallest I can trim this to is 411 characters in length. The field length is currently restricted to 128 characters.

Here's the regex below to give you an idea of what we face with UK couriers and remote areas. Our postcode format in the UK typically looks like these three examples AB12 3AB, M1 4HG, PO31 5RT.

/^BFPO|^TR(2[1-5])|^PO(3[0-9])|^PO(4[0-1])|^AB(3[1-8])|^AB(4[0-9])|^AB(5[0-6])|^IV([0-9])|^IV(1[0-9])|^IV(2[0-8])|^IV(3[0-2])|^IV(3[6-9])|^IV40|^IV(5[2-4])|^IV63|^KW([0-9])|^KW(1[0-4])|^PA(2[1-9])|^PA(3[0-8])|^PH([4-9])|^PH(1[0-9])|^PH(2[0-9])|^PH(3[0-9])|^PH(4[0-1])|^PH49|^PH50|^BT|^IM|^JE|^GY|^HS|^IV(4[1-9])|^IV51|^IV(5[5-6])|^KA(2[7-8])|^KW(1[5-7)|^PA20|^PA(4[1-9])|^PA(6[0-9])|^PA(7[0-8])|^PH(4[2-4])|^ZE/

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smartparty created an issue. See original summary.

smartparty’s picture

Issue summary: View changes
bojanz’s picture

Project: Commerce Shipping » Address
Version: 8.x-2.x-dev » 8.x-1.x-dev
Category: Support request » Task

Moving this to Address, since the form element comes from there. Looks like we need to make it a textarea.

smartparty’s picture

Its Friday, I've had a good day so decided to take time out and resolve this issue by way of creating my first patch.

smartparty’s picture

Status: Active » Needs review

  • bojanz committed 57bee30 on 8.x-1.x authored by smartparty
    Issue #2935002 by smartparty: Increase field length "Limit by Postal...
bojanz’s picture

Status: Needs review » Fixed

Thanks, that makes sense!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.