Skip to content

Commit 0bc1e0a

Browse files
authored
fix(form-item): should not validate when not have name (#5081)
1 parent 8beb37f commit 0bc1e0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/form/FormItem.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ export default defineComponent({
199199
return variables;
200200
});
201201
const validateRules = (options: ValidateOptions) => {
202+
// no name, no value, so the validate result is incorrect
203+
if (namePath.value.length === 0) {
204+
return;
205+
}
202206
const { validateFirst = false } = props;
203207
const { triggerName } = options || {};
204208

0 commit comments

Comments
 (0)