关键代码
/^1[3456789]\d{9}$/
实例
<template>
<van-form @submit="onSubmit">
<van-field
v-model="phonenumber"
:rules="[
{ required: true, message: '请填写您的手机号码!' },
{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式错误!'}
]"
type="tel"
label="联系方式"
placeholder="手机号码"
clearable
/>
</van-form>
</template>