We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3d4883 commit 343e3aaCopy full SHA for 343e3aa
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