validateForm: async()

in packages/x-flow/src/components/NodeEditor/index.tsx [40:58]


    validateForm: async () => {
      let result = true;
      if (
        nodeSetting?.settingSchema ||
        (isFunction(getSettingSchema) && Object.keys(asyncSchema).length > 0)
      ) {
        result = await form
          .validateFields()
          .then(() => {
            return true;
          })
          .catch(err => {
            return false;
          });
      } else if (nodeSetting?.settingWidget && nodeWidgetRef.current?.validateForm) {
        result = await nodeWidgetRef.current.validateForm();
      }
      return result;
    },