fix: 参数都是可选的,不填值不校验

This commit is contained in:
TsMask
2023-11-03 10:13:05 +08:00
parent fa7645bd5d
commit a7b128b53a

View File

@@ -895,6 +895,11 @@ function ruleVerification(row: Record<string, any>): (string | boolean)[] {
return result;
}
// 可选的同时没有值不检查
if (row.optional === 'true' && !value) {
return result;
}
switch (type) {
case 'int':
if (filter && filter.indexOf('~') !== -1) {