How to use the @ncform/ncform-common.ncformUtils.notEmptyVal function in @ncform/ncform-common

To help you get started, we’ve selected a few @ncform/ncform-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ncform / ncform / packages / ncform / src / regular-validation.js View on Github external
result: true,
          errMst: ""
        });
      } else if (
        (keys.indexOf("required") === -1 ||
          ncformUtils.smartAnalyzeVal(rules.required, {
            idxChain,
            data: { rootData: formData, constData: globalConfig.constants }
          }) === false ||
          ncformUtils.smartAnalyzeVal(
            _get(rules, "required.value"), {
              idxChain,
              data: { rootData: formData, constData: globalConfig.constants }
            }) === false
        ) &&
        !ncformUtils.notEmptyVal(value)
      ) {
        // 如果不存在required验证条件,且value为空时,直接验证通过
        resolve({
          result: true,
          errMsg: ""
        });
      } else {
        // 逐一验证
        resolve(nextValidate(0));
      }
    });
  }