WANG 6 年之前
父节点
当前提交
f4d1ae6688
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/modules/examwork/view/onlineExam.vue

+ 4 - 4
src/modules/examwork/view/onlineExam.vue

@@ -665,9 +665,9 @@ let validateWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= warnThreshold ||
-      !warnThreshold.toString().match(/^[1-9]\d*$/)
+      !warnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
-      callback(new Error("只能是整数"));
+      callback(new Error("只能是非负整数"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";
@@ -691,9 +691,9 @@ let validateLivingWarnThreshold = (rule, value, callback) => {
       }
     } else if (
       0 >= livingWarnThreshold ||
-      !livingWarnThreshold.toString().match(/^[1-9]\d*$/)
+      !livingWarnThreshold.toString().match(/^[1-9]\d*|0$/)
     ) {
-      callback(new Error("只能是整数"));
+      callback(new Error("只能是非负整数"));
       if (!_this.toActiveName) {
         _this.toActiveName = "tab4";
         _this.activeName = "tab4";