Skip to content

[4.x]: Singapore, Hong Kong, Gibraltar Addresses Won't Validate #4333

Description

@cherrykoda

What happened?

Description

Commerce orders that are Country: Singapore require the City to be provided, however entering a value does not validate and the address cannot be saved. Discovered while trying to upgrade from Craft Commerce 3.x to Commerce 4.x

Steps to reproduce

  1. Add an address to a Customer in Commerce 4.x
  2. Select Singapore as the country
  3. Enter a value for "City"
  4. Try to save the address

Expected behavior

When the required fields are entered, the address should successfully save.

Actual behavior

The Locality field ("City") is erroring because the system thinks the value is empty. The field handle on the CMS input field appears to be correct.

Image

Craft CMS version

4.18.1

Craft Commerce version

4.11.2

PHP version

8.2.31

Operating system and version

Linux 5.15.0-181-generic

Database type and version

PostgreSQL 14.3

Image driver and version

Imagick 3.8.1 (ImageMagick 7.1.2-25)

Installed plugins and versions

  • Cookies 4.0.1
  • Craft Commerce 4.11.2
  • DigitalOcean Spaces Filesystem 2.2.0
  • Logs 4.0.1
  • Postmark 3.1.0
  • Redactor 3.1.0
  • Snaptcha 4.1.2
  • Stripe for Craft Commerce 4.1.8.2
  • Typogrify 4.0.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions