代码: pattern: /^1[3456789]\d{9}$/
1.
<a-form-item label="原手机号" v-bind="validateInfos.contactTel">
<a-input
style="width: 600px"
allow-clear
:maxlength="20"
placeholder="请输入原手机号"
v-model:value="form.contactTel"
/>
</a-form-item>
</a-col>
2.
const rules = reactive({
contactTel: [
{
required: true,
message: '请输入正确的原手机号',
type: 'string',
pattern: /^1[3456789]\d{9}$/,
trigger: 'blur'
}
],
iphone: [
{
required: true,
message: '请输入正确的现手机号',
type: 'string',
pattern: /^1[3456789]\d{9}$/,
trigger: 'blur'
}
]
});