Validate child input components on submit with Vee-Validate

前端 未结 6 509
-上瘾入骨i
-上瘾入骨i 2021-01-17 17:36

I\'m currently trying to create a Registration form with multiple \"Input Field\" components which all require validating once Submit has been pressed. They all currently va

6条回答
  •  无人及你
    2021-01-17 18:09

    For plain Vuejs i use:

    inject: ['$validator'],
    

    in the child,

    and:

    provide() {
       return {
         $validator: this.$validator,
       };
    },
    

    in the parent.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题