We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ee4cd3c + 343e3aa commit eef874bCopy full SHA for eef874b
components/form/utils/validateUtil.ts
@@ -75,6 +75,12 @@ async function validateRule(
75
subRuleField = cloneRule.defaultField;
76
delete cloneRule.defaultField;
77
}
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
+ }
84
85
const validator = new AsyncValidator({
86
[name]: [cloneRule],
0 commit comments