I want give the validation in vuejs for that i am using 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
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 ' | '.
VeeValidate is the most popular Vue. js form library. It takes care of value tracking, validation, errors, submissions and more. Get Started Live Examples.
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).
import * as VeeValidate from 'vee-validate';
that resolve the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With