Skip to content

Commit

Permalink
Form-item: rules validate sync (#21892)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinguanhua authored Jun 2, 2022
1 parent a1c673d commit a2b7304
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 a2b7304

Please sign in to comment.