fix: 定时任务表达式校验 (#4324)
Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
parent
ed30e4e74f
commit
490403abfb
|
@ -312,26 +312,12 @@ function checkListField(value, minimal, maximal ) {
|
|||
values[j] = st[j];
|
||||
}
|
||||
|
||||
var previousValue = -1;
|
||||
|
||||
for (var i= 0; i < values.length; i++) {
|
||||
var currentValue = values[i];
|
||||
|
||||
if (!checkIntValue(currentValue, minimal, maximal, true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
var val = parseInt(currentValue, 10);
|
||||
|
||||
if (val <= previousValue) {
|
||||
return false;
|
||||
} else {
|
||||
previousValue = val;
|
||||
}
|
||||
} catch (e) {
|
||||
// we have always an int
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue