Commit 55a13769 authored by honghy's avatar honghy Committed by wux

【后台-会员等级】新增/修改页面中,“等级有效期”、“积分累计周期”要限制只能输入正整数

parent 59aa9abb
......@@ -291,10 +291,13 @@ export default {
validatePositiveIntegerorNull(rule, value, callback) {
if (value === '') {
callback();
} else if (!/^\d+$/.test(value)) {
callback(new Error(this.$t("请输入整数")));
} else {
callback();
const regex = /^[1-9]\d*$/;
if (regex.test(value)) {
callback();
} else {
callback(new Error(this.$t("请输入整数")));
}
}
},
handleMemberLevelDetails(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment