正则表达式:输入六位数或六位数以下的正整数。

^[1-9][0-9]{0,5}$

在线正则表达式测试

input失去焦点事件
onBlur(item){
if (item.applyQuantity && !/^[1-9][0-9]{0,5}$/.test(item.applyQuantity)) {
item.applyQuantity = ''
this.$Message.warning('请填写大于0的整数!')
}
},
posted @ 2019-09-04 18:38  苏小白啊  阅读(1635)  评论(0编辑  收藏  举报