We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53f3950 commit 4e4b9d6Copy full SHA for 4e4b9d6
components/form/utils/validateUtil.ts
@@ -75,10 +75,15 @@ async function validateRule(
75
subRuleField = cloneRule.defaultField;
76
delete cloneRule.defaultField;
77
}
78
- if (!rule.type && typeof rule.validator !== 'function' && typeof value !== 'string') {
+ if (
79
+ !rule.type &&
80
+ typeof rule.validator !== 'function' &&
81
+ typeof value !== 'string' &&
82
+ typeof value !== 'undefined'
83
+ ) {
84
warning(
85
false,
- `Form rules must provide type property when validating a value which is not string type`,
86
+ `Form rules must provide type property when validating the form item named [${name}] which is not string type`,
87
);
88
89
0 commit comments