Skip to content

Commit

Permalink
feat(form-input): update model only if value is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Jun 24, 2024
1 parent 49fa2a2 commit 3fe9bdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/form-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ watch(inputValue, (newValue) => {
forceContainerShowErrorNow.value = false
}
}
emits('update:modelValue', newValue)
if (inputInvalid.value === false) {
emits('update:modelValue', newValue)
}
})
const error = computed(() => {
Expand Down

0 comments on commit 3fe9bdb

Please sign in to comment.