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 位手机号;可不填" />