From b82e1f5330d3aa1e54d04e8156abd43b38b0c274 Mon Sep 17 00:00:00 2001 From: luishou Date: Mon, 28 Sep 2026 14:12:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(customers):=20=E4=BF=AE=E6=AD=A3=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=20HTML=20pattern=20=E8=AF=AF=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E5=90=88=E6=B3=95=E5=8F=B7=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 \d 改为 [0-9],避免结算人/联系人手机号前端格式校验误报。 Co-authored-by: Cursor --- src/app/(dashboard)/customers/customer-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(dashboard)/customers/customer-form.tsx b/src/app/(dashboard)/customers/customer-form.tsx index cf3c2b1..5239f03 100644 --- a/src/app/(dashboard)/customers/customer-form.tsx +++ b/src/app/(dashboard)/customers/customer-form.tsx @@ -140,7 +140,7 @@ export function CustomerForm({ name="contactsPhone" defaultValue={v.contactsPhone} required={requireAll} - pattern={requireAll ? "1\\d{10}" : undefined} + pattern={requireAll ? "1[0-9]{10}" : undefined} inputMode={requireAll ? "numeric" : undefined} title={requireAll ? "请输入 11 位手机号" : undefined} /> @@ -154,7 +154,7 @@ export function CustomerForm({ label="手机号" name="balanceUserPhone" defaultValue={v.balanceUserPhone} - pattern="1\\d{10}" + pattern="1[0-9]{10}" inputMode="numeric" title="有值时须为 11 位手机号;可不填" />