Skip to content

Commit eef874b

Browse files
committed
Merge branch 'next' of github.com:vueComponent/ant-design-vue into next
2 parents ee4cd3c + 343e3aa commit eef874b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/form/utils/validateUtil.ts

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ async function validateRule(
7575
subRuleField = cloneRule.defaultField;
7676
delete cloneRule.defaultField;
7777
}
78+
if (!rule.type && typeof rule.validator !== 'function' && typeof value !== 'string') {
79+
warning(
80+
false,
81+
`Form rules must provide type property when validating a value which is not string type`,
82+
);
83+
}
7884

7985
const validator = new AsyncValidator({
8086
[name]: [cloneRule],

0 commit comments

Comments
 (0)