fix(regular-validation.js): fixed non-required fields still verify rules width empty value problem

fix #16
This commit is contained in:
xiaow
2018-09-10 14:55:06 +08:00
parent ec2c30471e
commit fe9901c749
+2 -2
View File
@@ -150,11 +150,11 @@ class RegularValidation {
data: { rootData: formData, constData: globalConfig.constants }
}) === false ||
ncformUtils.smartAnalyzeVal(
_get(rules, "required.value", {
_get(rules, "required.value"), {
idxChain,
data: { rootData: formData, constData: globalConfig.constants }
}) === false
)) &&
) &&
!ncformUtils.notEmptyVal(value)
) {
// 如果不存在required验证条件,且value为空时,直接验证通过