Browse Source

feat: Form.Item support validateFirst (#21178)

pull/21226/head
二货机器人 5 years ago
committed by GitHub
parent
commit
b36e96043f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/form/index.en-US.md
  2. 1
      components/form/index.zh-CN.md
  3. 2
      package.json

1
components/form/index.en-US.md

@ -85,6 +85,7 @@ Form field component for data bidirectional binding, validation, layout, and so
| rules | Rules for field validation. Click [here](#components-form-demo-basic) to see an example | [Rule](#Rule)[] | - |
| shouldUpdate | Custom field update logic. See [bellow](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false |
| trigger | When to collect the value of children node | string | onChange |
| validateFirst | Whether stop validate on first rule of error for this field | boolean | false |
| validateStatus | The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating' | string | - |
| validateTrigger | When to validate the value of children node | string \| string[] | onChange |
| valuePropName | Props of children node, for example, the prop of Switch is 'checked' | string | 'value' |

1
components/form/index.zh-CN.md

@ -86,6 +86,7 @@ const validateMessages = {
| rules | 校验规则,设置字段的校验逻辑。点击[此处](#components-form-demo-basic)查看示例 | [Rule](#Rule)[] | - |
| shouldUpdate | 自定义字段更新逻辑,说明[见下](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false |
| trigger | 设置收集字段值变更的时机 | string | onChange |
| validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false |
| validateStatus | 校验状态,如不设置,则会根据校验规则自动生成,可选:'success' 'warning' 'error' 'validating' | string | - |
| validateTrigger | 设置字段校验的时机 | string \| string[] | onChange |
| valuePropName | 子节点的值的属性,如 Switch 的是 'checked' | string | 'value' |

2
package.json

@ -107,7 +107,7 @@
"rc-dialog": "~7.6.0",
"rc-drawer": "~3.1.1",
"rc-dropdown": "~3.0.0-alpha.0",
"rc-field-form": "^0.0.0-rc.0",
"rc-field-form": "^0.0.0-rc.1",
"rc-input-number": "~4.5.0",
"rc-mentions": "~1.0.0-alpha.3",
"rc-menu": "~8.0.0-alpha.7",

Loading…
Cancel
Save