From 360bf8ab2ac918f70c426372f4590a4897f17423 Mon Sep 17 00:00:00 2001 From: jynxio Date: Fri, 22 Nov 2024 21:45:52 +0800 Subject: [PATCH] docs: Rule.message type definition in Form Comp (#51709) --- components/form/index.en-US.md | 2 +- components/form/index.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/form/index.en-US.md b/components/form/index.en-US.md index 87ad54997d..eac0d13cf5 100644 --- a/components/form/index.en-US.md +++ b/components/form/index.en-US.md @@ -549,7 +549,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig); | fields | Validate rule for child elements, valid when `type` is `array` or `object` | Record<string, [rule](#rule)> | | | len | Length of string, number, array | number | | | max | `type` required: max length of `string`, `number`, `array` | number | | -| message | Error message. Will auto generate by [template](#validatemessages) if not provided | string | | +| message | Error message. Will auto generate by [template](#validatemessages) if not provided | string \| ReactElement | | | min | `type` required: min length of `string`, `number`, `array` | number | | | pattern | Regex pattern | RegExp | | | required | Required field | boolean | | diff --git a/components/form/index.zh-CN.md b/components/form/index.zh-CN.md index 5dceb2d895..093e094c9b 100644 --- a/components/form/index.zh-CN.md +++ b/components/form/index.zh-CN.md @@ -548,7 +548,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig); | fields | 仅在 `type` 为 `array` 或 `object` 类型时有效,用于指定子元素的校验规则 | Record<string, [rule](#rule)> | | | len | string 类型时为字符串长度;number 类型时为确定数字; array 类型时为数组长度 | number | | | max | 必须设置 `type`:string 类型为字符串最大长度;number 类型时为最大值;array 类型时为数组最大长度 | number | | -| message | 错误信息,不设置时会通过[模板](#validatemessages)自动生成 | string | | +| message | 错误信息,不设置时会通过[模板](#validatemessages)自动生成 | string \| ReactElement | | | min | 必须设置 `type`:string 类型为字符串最小长度;number 类型时为最小值;array 类型时为数组最小长度 | number | | | pattern | 正则表达式匹配 | RegExp | | | required | 是否为必选字段 | boolean | |