woocommerce/plugins
Sam Seay 137a2e8aa6
Checkout: Add placeholder option to country and state select, add error validation (#49616)
* WIP

* Add empty option for state as well

* Add client-side validation to country select inputs

* Add validation messages for state.

* Clean up redundant destructuring.

* Fix up the validation logic, fix bug where empty select was shown in some cases.

* Remove unused import

* Use import aliases instead of large relative paths

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Fix a typo

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* use SelectOption type

* Also handle when address changes, because we shouldnt validate state when there is an address change

* adjust validation to handle any address change, not just country. translate field validations and use lowercase

* add a lowercase label for the country select as well

* Fix an issue where scroll to would not scroll to invalid select

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2024-07-24 17:59:15 +02:00
..
woo-ai Monorepo: zips build script update (frozen lock files) (#49640) 2024-07-19 13:07:48 +02:00
woocommerce Checkout: Add placeholder option to country and state select, add error validation (#49616) 2024-07-24 17:59:15 +02:00
woocommerce-admin Monorepo: rework deps patching in favour of built-in pnpm functionality (#49892) 2024-07-24 08:38:32 -07:00
woocommerce-beta-tester Monorepo: zips build script update (frozen lock files) (#49640) 2024-07-19 13:07:48 +02:00
woocommerce-blocks Checkout: Add placeholder option to country and state select, add error validation (#49616) 2024-07-24 17:59:15 +02:00