Explorar el Código

空字符串验证调整

wangqiang hace 11 meses
padre
commit
d31aa8a74e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      common/graceChecker.js

+ 1 - 1
common/graceChecker.js

@@ -93,7 +93,7 @@ module.exports = {
 					}
 				break;
 				case 'notnull':
-					if(value == null || value.length < 1){this.error = rule[i].errorMsg; return false;}
+					if(value == null || value.trim().length === 0){this.error = rule[i].errorMsg; return false;}
 				break;
 			}
 		}