Merge branch 'next' of github.com:vueComponent/ant-design-vue into next

pull/3131/head^2
tangjinzhou 2020-11-07 23:10:11 +08:00
commit eef874b805
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ async function validateRule(
subRuleField = cloneRule.defaultField;
delete cloneRule.defaultField;
}
if (!rule.type && typeof rule.validator !== 'function' && typeof value !== 'string') {
warning(
false,
`Form rules must provide type property when validating a value which is not string type`,
);
}
const validator = new AsyncValidator({
[name]: [cloneRule],