Skip to content

Commit e29ad47

Browse files
authored
fix(form): form rules type error (#3150)
1 parent f38c5a2 commit e29ad47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/form/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const FormProps = {
5252
prefixCls: PropTypes.string,
5353
hideRequiredMark: PropTypes.looseBool,
5454
model: PropTypes.object,
55-
rules: { type: Object as PropType<ValidationRule[]> },
55+
rules: { type: Object as PropType<{[k: string]: ValidationRule[] | ValidationRule}> },
5656
validateMessages: PropTypes.object,
5757
validateOnRuleChange: PropTypes.looseBool,
5858
// 提交失败自动滚动到第一个错误字段

0 commit comments

Comments
 (0)