Skip to content

Remove optional ? in PT zip_regex#493

Open
AndreaSmith053122 wants to merge 2 commits into
mainfrom
pt-seven-digit-postal-code
Open

Remove optional ? in PT zip_regex#493
AndreaSmith053122 wants to merge 2 commits into
mainfrom
pt-seven-digit-postal-code

Conversation

@AndreaSmith053122
Copy link
Copy Markdown

What are you trying to accomplish?

Portugal postal code format should be XXXX-XXX, all numeric. Our current regex does not require the second set of three digits, despite it being the required format since 1998.

Contributes to https://github.com/shop/issues-checkout/issues/11587

What approach did you choose and why?

  • Remove the ? part of the regex making the second set of digits optional.
  • Leave the ? that makes the - optional.

What should reviewers focus on?

I don't think there's any way to flag these changes for a gradual rollout, but I'd be happy to hear otherwise.

The impact of these changes

[After services start using the new gem version]

  • Customers will be required to enter the full postal code
  • Merchants touching old records will need to put in the full postal code. We expect Atlas to be able to provide the correct value.

Checklist

  • I have added a CHANGELOG entry for this change (or determined that it isn't needed)

@AndreaSmith053122 AndreaSmith053122 requested review from a team and ananyaneogi and removed request for a team May 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant