docs(Form): add data structure of Rule

This commit is contained in:
陈嘉涵
2020-02-20 10:09:25 +08:00
parent b8c1551d8c
commit e5097dba9f
4 changed files with 23 additions and 3 deletions
+9
View File
@@ -413,6 +413,15 @@ export default {
| validate-first | Whether to stop the validation when a rule fails | *boolean* | `false` |
| validate-trigger `v2.5.2` | When to validate the formcan be set to `onChange``onSubmit` | *string* | `onBlur` |
### Data Structure of Rule
| Key | Description | Type |
|------|------|------|
| message | Error message | *string* |
| required | Whether to be a required field | *boolean* |
| validator | Custom validator | *() => boolean \| Promise* |
| trigger `v2.5.2` | When to validate the formcan be set to `onChange``onBlur` | *string* |
### Events
| Event | Description | Arguments |