From eddb35c78229e5000bf331335069eca29ff3a989 Mon Sep 17 00:00:00 2001 From: ShuGang Zhou Date: Wed, 25 Oct 2023 20:42:27 +0800 Subject: [PATCH] fix(AddressEdit): area field validate error when showArea is false (#12393) --- packages/vant/src/address-edit/AddressEdit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant/src/address-edit/AddressEdit.tsx b/packages/vant/src/address-edit/AddressEdit.tsx index eec2212a3..2cf82042f 100644 --- a/packages/vant/src/address-edit/AddressEdit.tsx +++ b/packages/vant/src/address-edit/AddressEdit.tsx @@ -297,7 +297,7 @@ export default defineComponent({ label={t('area')} is-link={!disableArea} modelValue={areaText.value} - rules={rules.value.areaCode} + rules={props.showArea ? rules.value.areaCode : undefined} placeholder={props.areaPlaceholder || t('area')} onFocus={() => onFocus('areaCode')} onClick={() => {