对输入框输入的内容做验证

ywj_dev
wangwei 2 years ago
parent 7c6cc57a12
commit a320b99ed0

@ -136,7 +136,8 @@
<el-col :span="12" type="flex">
<el-form-item label="社会信用号" prop="creditNo">
<el-input v-model="editQuery.creditNo" style="width: 90%" splaceholder="请输入社会信用号"
auto-complete="off"></el-input>
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" type="flex">
@ -274,7 +275,8 @@ export default {
// {required: true, message: "", trigger: "blur"}
// ],
creditNo: [
{required: true, message: "请输入社会信用号", trigger: "blur"}
{required: true, message: "请输入社会信用号", trigger: "blur"},
{pattern: '/^([0-9A-HJ-NPQRTUWXY]{2}\\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\\d{14})$/\n',message:'社会信用号不合法'}
]
},
spellUpdate: false,

@ -131,6 +131,7 @@
style="width: 80%"
size="small"
type="number"
oninput="value=value.replace(/[^\d]/g,'')"
splaceholder="请输入内容"
v-model="editQuery.overStockNum"
></el-input>
@ -142,6 +143,7 @@
style="width: 80%"
size="small"
type="number"
oninput="value=value.replace(/[^\d]/g,'')"
splaceholder="请输入内容"
v-model="editQuery.lowStockNum"
></el-input>

Loading…
Cancel
Save