B
B
Bohdan Zhorov2019-06-15 22:15:09
Vue.js
Bohdan Zhorov, 2019-06-15 22:15:09

Why is $v not defined?

Good afternoon. When calling this.$v in the console, an error pops up.
the code is written in main.js:

import vuelidate from 'vuelidate'
Vue.use(vuelidate)

new Vue({
  router,
  store,
  vuelidate,
  render: h => h(App),
}).$mount('#app')

Component code:
<script>
//import { email, required } from "vuelidate/lib/validators"
export default {
  data() {
    return {
      form: {
        email: null,
        password: null
      }
    }
  },
  validatinons: {
    form: {
      email: {
        //required
      },
      password: {
        //Srequired
      }
    }
  },
  methods: {
    login() {
      console.log(this.$v)
      this.$store.dispatch('auth/loginWithEmailAndPassword', this.form)
    }
  }
}
</script>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-06-15
@sain_Fa

validatinons: {

Yah? But maybe still validations?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question