From 9b72caf77ecdd7df1807d0c27f7cdd6eae961a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Wed, 17 Apr 2024 15:54:42 +0800 Subject: [PATCH] feat: up form (#48486) --- components/form/index.en-US.md | 2 +- components/form/index.zh-CN.md | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index af0329af9d..ab69fe5d7b 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -539,7 +539,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig); | pattern | Regex pattern | RegExp | | | required | Required field | boolean | | | transform | Transform value to the rule before validation | (value) => any | | -| type | Normally `string` \|`number` \|`boolean` \|`url` \| `email`. More type to ref [here](https://github.com/yiminghe/async-validator#type) | string | | +| type | Normally `string` \|`number` \|`boolean` \|`url` \| `email`. More type to ref [here](https://github.com/react-component/async-validator#type) | string | | | validateTrigger | Set validate trigger event. Must be the sub set of `validateTrigger` in Form.Item | string \| string\[] | | | validator | Customize validation rule. Accept Promise as return. See [example](#components-form-demo-register) | ([rule](#rule), value) => Promise | | | warningOnly | Warning only. Not block form submit | boolean | 4.17.0 | diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index e45b555cb2..d31c339ed2 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -538,7 +538,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig); | pattern | 正则表达式匹配 | RegExp | | | required | 是否为必选字段 | boolean | | | transform | 将字段值转换成目标值后进行校验 | (value) => any | | -| type | 类型,常见有 `string` \|`number` \|`boolean` \|`url` \| `email`。更多请参考[此处](https://github.com/yiminghe/async-validator#type) | string | | +| type | 类型,常见有 `string` \|`number` \|`boolean` \|`url` \| `email`。更多请参考[此处](https://github.com/react-component/async-validator#type) | string | | | validateTrigger | 设置触发验证时机,必须是 Form.Item 的 `validateTrigger` 的子集 | string \| string\[] | | | validator | 自定义校验,接收 Promise 作为返回值。[示例](#components-form-demo-register)参考 | ([rule](#rule), value) => Promise | | | warningOnly | 仅警告,不阻塞表单提交 | boolean | 4.17.0 | diff --git a/package.json b/package.json index 1e59a5e7c9..4df45ff87e 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "rc-dialog": "~9.4.0", "rc-drawer": "~7.1.0", "rc-dropdown": "~4.2.0", - "rc-field-form": "~1.44.0", + "rc-field-form": "~2.0.0", "rc-image": "~7.6.0", "rc-input": "~1.4.5", "rc-input-number": "~9.0.0",