Skip to content

Commit

Permalink
Form-item: rules validate sync (ElemeFE#21892)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinguanhua authored and hzsrc committed Feb 2, 2023
1 parent 0fc0c2f commit 3fe3c36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/form/src/form-item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
},
validateStatus(value) {
this.validateState = value;
},
rules(value) {
if ((!value || value.length === 0) && this.required === undefined) {
this.clearValidate();
}
}
},
computed: {
Expand Down

0 comments on commit 3fe3c36

Please sign in to comment.