[Solved] "TypeError: this.$refs.newref.validate is not a function"



  • <q-select
            v-for="(items, key) in attributeNameValues"
            :key="key"
            class="col-12 q-mt-md"
            square
            dense
            ref="newref"
            outlined
            v-model="selected[key]"
            @input="updateSlide"
            :prefix="key + ' :'"
            :options="attributeNameValues[key]"
            :rules="[val => val != undefined || $t('required')]"
            lazy-rules="ondemand"
           />
    
    this.$refs.newref.validate();
    

    what could be the cause of this error
    98edc4c9-6c9b-45cc-97c8-e235240de664-image.png



  • for (var v = 0; v < this.$refs.newref.length; v++){
    this.$refs.newref[v].validate();
    }
    I found the answer


Log in to reply