Learn how to use text fields for positive validation and send data
P粉574695215
2023-08-09 18:56:19
<p>I have a <code>v-text-field</code> with validation rules that trigger something when focus is lost. </p>
<pre class="brush:php;toolbar:false;"><v-text-field
:rules="validationRules"
@blur="emitFunction"
></v-text-field></pre>
<p>Is there a way to only call <code>emitFunction</code> when validation passes? </p>
You can wrap it with v-form and use
v-model
to track the validity of the form