Skip to content

fix: set false as default value to validateOnRuleChange in FormModel #4040

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion antdv-demo/docs/form-model/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| labelCol | The layout of label. You can set `span` `offset` to something like `{span: 3, offset: 12}` or `sm: {span: 3, offset: 12}` same as with `<Col>` | [object](/components/grid/#Col) | | |
| wrapperCol | The layout for input controls, same as `labelCol` | [object](/components/grid/#Col) | | |
| colon | change default props colon value of Form.Item (only effective when prop layout is horizontal) | boolean | true | |
| validateOnRuleChange | whether to trigger validation when the `rules` prop is changed | boolean | true | |
| validateOnRuleChange | whether to trigger validation when the `rules` prop is changed | boolean | false | |

### Events

Expand Down
2 changes: 1 addition & 1 deletion antdv-demo/docs/form-model/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| labelCol | label 标签布局,同 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` 或 `sm: {span: 3, offset: 12}` | [object](/components/grid-cn/#Col) | | |
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | [object](/components/grid-cn/#Col) | | |
| colon | 配置 Form.Item 的 colon 的默认值 (只有在属性 layout 为 horizontal 时有效) | boolean | true | |
| validateOnRuleChange | 是否在 rules 属性改变后立即触发一次验证 | boolean | true | |
| validateOnRuleChange | 是否在 rules 属性改变后立即触发一次验证 | boolean | false | |

### 事件

Expand Down
1 change: 1 addition & 0 deletions components/form-model/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const Form = {
layout: 'horizontal',
hideRequiredMark: false,
colon: true,
validateOnRuleChange: false,
}),
Item: FormItem,
created() {
Expand Down