diff --git a/libs/payments/ui/src/lib/client/components/SelectTaxLocation/index.tsx b/libs/payments/ui/src/lib/client/components/SelectTaxLocation/index.tsx index 43d4164d23f..218e367409c 100644 --- a/libs/payments/ui/src/lib/client/components/SelectTaxLocation/index.tsx +++ b/libs/payments/ui/src/lib/client/components/SelectTaxLocation/index.tsx @@ -421,6 +421,16 @@ const Expanded = ({ invalidPostalCode: false, })); }} + onInvalid={(e: React.FormEvent) => { + if (e?.currentTarget?.validity?.patternMismatch) { + setServerErrors((prev) => ({ + ...prev, + invalidPostalCode: true, + })); + } + }} + pattern="^[\p{L}\p{N}\s\-\.\,]{1,15}$" + maxLength={15} defaultValue={initialPostalCode} required aria-required