kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

vue.common.js?e881:511 [Vue warn]: Unknown custom element: <validator> - did you register the component correctly? For recursive components, make sure to provide the "name" option. #345

Closed yonycat closed 7 years ago

yonycat commented 7 years ago

Version of vuejs: 2.1.0 Version of vue-validator: ^3.0.0-alpha.1

I vue init vue-validator in this way: import Vue from 'vue' Vue.use(VueValidator) then in my login web component: i use it in this way: `html

` But I got vuejs warn that validator custom element is not registered.

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

huhk-sysu commented 7 years ago

I came across the same error. It seems that the example is for vue-validator v2. And in v3 the directive "validator" was abandoned and they use "validation" instead.

Check this example.

yonycat commented 7 years ago

@huhk-sysu Thank you very much.It works.