vuelidate async validator - how to debounce? vuelidate async validator - how to debounce? vue.js vue.js

vuelidate async validator - how to debounce?


as 'Teddy Markov' said, you could call $v.yourValidation.$touch() on your input blur event. I think it's more efficient way to use Vuelidate.

<input type="email" class="form-control col-md-6 col-sm-12"           :class="{ 'is-invalid': !$v.user.email.$anyError }"           id="emailAddress" v-model.trim="$v.user.email.$model"           @change="delayTouch($v.user.email)"           @blur="$v.user.email.$touch()"           aria-describedby="emailHelp"           placeholder="email@example.com">


I found the best way was to combine with regex for emailsif regex test passes then proceed to check if unique - else skip the check completely.