Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] 期望覆盖默认的validator triggerType "onInput" #4044

Open
1 task done
canvascat opened this issue Dec 11, 2023 · 3 comments
Open
1 task done

Comments

@canvascat
Copy link

canvascat commented Dec 11, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

当我不希望任何事件会触发检验,这很有用。

现在如果我不需要默认的triggerType,我必须给每个validator都设置一个不存在的trigger

const schema: ISchema = {
  type: "object",
  properties: {
    input: {
      type: "string",
      title: "输入框",
      description: "这是一个输入框",
      "x-validator": {
        triggerType: "",
        required: true,
      },
    },
  }
}

如果我不设置 triggerType,将会在输入时触发校验

What does the proposed API look like?

/

@faner11
Copy link
Contributor

faner11 commented Dec 26, 2023

你别设置规则不就行了

@coolbob1998
Copy link
Contributor

如果是只想展示必填的星号,设置 FormItem 的属性就行了。在 schema 中就是 decoratorProps

@canvascat
Copy link
Author

如果是只想展示必填的星号,设置 FormItem 的属性就行了。在 schema 中就是 decoratorProps

希望只有提交时触发校验,不希望触发trigger时触发校验😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants