Skip to content
This repository was archived by the owner on Dec 25, 2017. It is now read-only.

vue-validator error #368

Open
anasmorahhib opened this issue Oct 21, 2017 · 2 comments
Open

vue-validator error #368

anasmorahhib opened this issue Oct 21, 2017 · 2 comments

Comments

@anasmorahhib
Copy link

anasmorahhib commented Oct 21, 2017

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

require('./bootstrap');

window.Vue = require('vue');

import Vuex from 'vuex'
Vue.use(Vuex)

import VueValidator from 'vue-validator'
Vue.use(VueValidator)
<validator name="validation1">
  <div class="username">
    <label for="username">username:</label>
    <input id="username" type="text" v-validate:username="{
      required: { rule: true, message: 'required you name !!' }
    }">
    <span v-if="$validation1.username.required">{{ $validation1.username.required }}</span>
  </div>
  <div class="password">
    <label for="password">password:</label>
    <input id="password" type="password" v-validate:password="{
      required: { rule: true, message: 'required you password !!' },
      minlength: { rule: 8, message: 'your password short too !!' }
    }"/>
    <span v-if="$validation1.password.required">{{ $validation1.password.required }}</span>
    <span v-if="$validation1.password.minlength">{{ $validation1.password.minlength }}</span>
  </div>
</validator>
@minguman
Copy link

me too ;
i think ... may be the issue of vue version, my vue --version 2.9.1

@minguman
Copy link

oh, Just now, I saw the description, does not support 2.2 or later versions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants