Skip to content

Commit

Permalink
fix(form): dynamic rules validate status (#1071)
Browse files Browse the repository at this point in the history
* fix(form): dynamic rules validate status

* fix(form): remove duplicated code
  • Loading branch information
k1nz committed Jun 25, 2022
1 parent a44aba3 commit 1d9884e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/form/form-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ export default defineComponent({
trigger === 'all'
? innerRules.value
: innerRules.value.filter((item) => (item.trigger || 'change') === trigger);
if (!result.rules?.length) {
resetValidating.value = false;
if (innerRules.value.length && !result.rules?.length) {
return result;
}
result.allowSetValue = true;
Expand Down

0 comments on commit 1d9884e

Please sign in to comment.