fix(customers): 修正手机号 HTML pattern 误拦截合法号码
将 \d 改为 [0-9],避免结算人/联系人手机号前端格式校验误报。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 位手机号;可不填"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user