[Vuejs]-How to only emit from text-field after positive validation

1👍

You can wrap it in v-form, and track if the form is valid with v-model

const isValid = ref(false)
function emitIfValid() {
  if (isValid.value) emitFunction()
}
<v-form v-model="isValid">
  <v-text-field
    :rules="validationRules"
    @blur="emitIfValid"
  />
</v-form>

Leave a comment