Commit f08c7184 authored by Smile's avatar Smile Committed by wux

会员等级配置积分最低值修改时不能为0错误修改

parent 4a63ef22
...@@ -290,16 +290,13 @@ export default { ...@@ -290,16 +290,13 @@ export default {
} }
}, },
validatePositiveInteger2(rule, value, callback) { validatePositiveInteger2(rule, value, callback) {
if (!value) {
return callback(new Error(this.$t("请输入整数")));
} else {
const regex = /^(?:0|[1-9]\d*)$/; const regex = /^(?:0|[1-9]\d*)$/;
if (regex.test(value)) { if (regex.test(value)) {
callback(); callback();
} else { } else {
callback(new Error(this.$t("请输入整数"))); callback(new Error(this.$t("请输入整数")));
} }
}
}, },
validatePositiveIntegerorNull(rule, value, callback) { validatePositiveIntegerorNull(rule, value, callback) {
if (value === ''||value === null) { if (value === ''||value === null) {
......
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