Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validation in vue js using vee-validate having error

Tags:

vue.js

I want give the validation in vuejs for that i am using vee-validate

  • My vue js version is 2.6.10
  • And install run -npm install vee-validate

I declare in main.ts:

import  VeeValidate  from "vee-validate";
Vue.use(VeeValidate);

But having error:

"export 'default' (imported as 'VeeValidate') was not found in 'vee-validate'

And also on console:

Cannot read property 'install' of undefined at Function.Vue.use

like image 758
ShrJoshi Avatar asked Aug 27 '19 12:08

ShrJoshi


People also ask

How do I configure Vee validation?

All you need is to add the v-validate directive to the input you wish to validate and make sure your input has a name attribute for error messages generation. Then, pass to the directive a rules string which contains a list of validation rules separated by a pipe ' | '.

What is vee validate?

VeeValidate is the most popular Vue. js form library. It takes care of value tracking, validation, errors, submissions and more. Get Started Live Examples.

What is validation error?

Validations errors are errors when users do not respond to mandatory questions. A validation error occurs when you have validation/response checking turned on for one of the questions and the respondent fails to answer the question correctly (for numeric formatting , required response).


1 Answers

import * as VeeValidate from 'vee-validate';

that resolve the problem

like image 69
Rayco García Fernández Avatar answered Sep 26 '22 00:09

Rayco García Fernández