docs: Rule.message type definition in Form Comp (#51709)
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run

This commit is contained in:
jynxio 2024-11-22 21:45:52 +08:00 committed by GitHub
parent 938988109f
commit 360bf8ab2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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)> | | | fields | Validate rule for child elements, valid when `type` is `array` or `object` | Record<string, [rule](#rule)> | |
| len | Length of string, number, array | number | | | len | Length of string, number, array | number | |
| max | `type` required: max 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 | | | min | `type` required: min length of `string`, `number`, `array` | number | |
| pattern | Regex pattern | RegExp | | | pattern | Regex pattern | RegExp | |
| required | Required field | boolean | | | required | Required field | boolean | |

View File

@ -548,7 +548,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| fields | 仅在 `type``array``object` 类型时有效,用于指定子元素的校验规则 | Record<string, [rule](#rule)> | | | fields | 仅在 `type``array``object` 类型时有效,用于指定子元素的校验规则 | Record<string, [rule](#rule)> | |
| len | string 类型时为字符串长度number 类型时为确定数字; array 类型时为数组长度 | number | | | len | string 类型时为字符串长度number 类型时为确定数字; array 类型时为数组长度 | number | |
| max | 必须设置 `type`string 类型为字符串最大长度number 类型时为最大值array 类型时为数组最大长度 | number | | | max | 必须设置 `type`string 类型为字符串最大长度number 类型时为最大值array 类型时为数组最大长度 | number | |
| message | 错误信息,不设置时会通过[模板](#validatemessages)自动生成 | string | | | message | 错误信息,不设置时会通过[模板](#validatemessages)自动生成 | string \| ReactElement | |
| min | 必须设置 `type`string 类型为字符串最小长度number 类型时为最小值array 类型时为数组最小长度 | number | | | min | 必须设置 `type`string 类型为字符串最小长度number 类型时为最小值array 类型时为数组最小长度 | number | |
| pattern | 正则表达式匹配 | RegExp | | | pattern | 正则表达式匹配 | RegExp | |
| required | 是否为必选字段 | boolean | | | required | 是否为必选字段 | boolean | |