When using vee-validate, a Vue.js plugin for form validation, my goal is to display an image after the input field has been validated. I attempted to achieve this using v-show="!errors.has('fname')"
. However, the issue arises when the image appears before the validation is complete, as there are no errors at that point. How can I ensure the image only displays when the input field is valid?
<form>
<input v-validate="{rules: {required: true, alpha: true, min: 3}}" type="text" id="fname" name="fname"/>
<img v-show="!errors.has('fname')" class="check-icon" src="../../assets/png/check-icon.png" alt="check-icon"/>
</form>