Skip to content

Commit

Permalink
fix(form-item): should not validate when not have name (#5081)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkwolf authored Dec 27, 2021
1 parent 8beb37f commit 0bc1e0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ export default defineComponent({
return variables;
});
const validateRules = (options: ValidateOptions) => {
// no name, no value, so the validate result is incorrect
if (namePath.value.length === 0) {
return;
}
const { validateFirst = false } = props;
const { triggerName } = options || {};

Expand Down

0 comments on commit 0bc1e0a

Please sign in to comment.