Open canvascat opened 7 months ago
当我不希望任何事件会触发检验,这很有用。
现在如果我不需要默认的triggerType,我必须给每个validator都设置一个不存在的trigger
const schema: ISchema = { type: "object", properties: { input: { type: "string", title: "输入框", description: "这是一个输入框", "x-validator": { triggerType: "", required: true, }, }, } }
如果我不设置 triggerType,将会在输入时触发校验
/
你别设置规则不就行了
如果是只想展示必填的星号,设置 FormItem 的属性就行了。在 schema 中就是 decoratorProps
希望只有提交时触发校验,不希望触发trigger时触发校验😅
What problem does this feature solve?
当我不希望任何事件会触发检验,这很有用。
现在如果我不需要默认的triggerType,我必须给每个validator都设置一个不存在的trigger
如果我不设置 triggerType,将会在输入时触发校验
What does the proposed API look like?
/