Questions tagged [vee-validate]

For question related with VeeValidate library for Vue.js.

VeeValidate is a validation library for Vue.js. It has plenty of validation rules out of the box and support for custom ones as well. It is template based so it is similar and familiar with the HTML5 validation API. You can validate HTML5 inputs as well as custom Vue components.

It is also built with localization in mind.

610 questions
0
votes
1 answer

Vee validation is not working inside the tag

Below is my code. In the addEmployee.vue file, fields are there. Firstname , Middlename , Lastname. Among the three fields "Firtname & Lastname" has noraml tag. But "Middlename" has tag. Vee-validate "required" validation is working for the normal…
Ashwini
  • 295
  • 3
  • 10
  • 31
0
votes
0 answers

Specify custom messages for every form using vee validate

Imagine I have two forms, each has email field required. I want to: Show different validation messages for each form Be able to localize them Why do I need this: for example, when user signs up and doesn't fill out email field I want to display…
Victor
  • 5,073
  • 15
  • 68
  • 120
0
votes
1 answer

Vuejs - How to call the mounted function of main.js from another Js file

This is the code I have given in commonValidation.js. commonValidation.js: this.$validator.localize('en', { messages: { required: (field) => '* ' + field + ' is required' }, attributes: { email: 'Email' } …
Ashwini
  • 295
  • 3
  • 10
  • 31
0
votes
1 answer

Javascript functions are not working properly in the vuejs

Below is my code. I would like to validate the form during submit. I prevented submit action untill all data is valid. Hence I have used "validata all()" method. If the form has null/invalid date, it should alert "not submitted".Else it…
Ashwini
  • 295
  • 3
  • 10
  • 31
0
votes
1 answer

How to write a custom / generic validation for the input fields using vee-validation in vuejs2

Below is my code. In that, firstname, lastname, middlename input fields are there. I want to use a singe method to throw an error for those fields. Iam able to pass only a single field inside the validator.extend function. E.g:…
Ashwini
  • 295
  • 3
  • 10
  • 31
0
votes
1 answer

Using validateAll() with custom v-select tag in scope

I have a scenario where I have scoped a form so that I can validate it using Vee-Validate using below method. validateTRForm: function (scope) { this.$validator.validateAll(scope).then((result) => { if (result) { } Vue…
Dii
  • 147
  • 13
0
votes
0 answers

vee validate is not working with vue.js version 1.0.28

Versions: VueJs: version 1.0.28 Vee-Validate: any version Description: I am using vue js version 1.0.28 in my project. Now i want to use vee validate with vue js. But i am getting vee validation compatibility issue with vue js version 1.0.28. Now i…
Zaheer Babar
  • 1,636
  • 1
  • 15
  • 17
0
votes
1 answer

VeeValidate - custom validation functions in ES5

I'm creating a custom validation rule using VeeValidate. The offical docs uses arrow functions for the getMessage and validate methods. How do I implement these functions in the regular function…
Bargain23
  • 1,863
  • 3
  • 29
  • 50
0
votes
1 answer

Vue plugin vee-validate not installing properly

I'm trying to use the vee-validate plugin for form validation without using npm install --save, so I copied the files in the dist folder into my project, but for some reason I can't use the plugin properly. This is how I call the plugin as a script…
Bargain23
  • 1,863
  • 3
  • 29
  • 50
0
votes
1 answer

Hide/delay password confirmation error in Vee validate

When I use Vee-validate library in Vuejs, when I focus on password field, it show the error not match with password confirm. My code:
Corey
  • 107
  • 3
  • 10
0
votes
1 answer

CSS3 Bootstrap 4 How to handle theinput error message with inline inputs

I have currently 2 input fields on the same line to be validated with vee-validate (I am using Vue.js). The validation message is displayed at the end of the input-group, not inside it. Here is the html code:
user762579
0
votes
0 answers

Can I turn off automatic reset of field value?

I use VeeValidate in my project with vuex. I have a problem with simple input field that is used as a setter for length of an array. Default length = 3. It looks like this:
Mariusz
  • 103
  • 1
  • 8
0
votes
2 answers

child components validation vee-validate

I am using vee-validate to validate my fields and here is my question : I want to validate forms before submitting and some forms are located in child components so how can I approach that?
user7459213
0
votes
1 answer

vuejs vee-validate: this.error.add -> add message from dictionary

I have a simple login form and i show a message if the user use a wrong password or username js onSignin() { axios.post( 'api/user/signin', { email: this.email, password: this.password, }, …
Gregor Voinov
  • 2,203
  • 7
  • 34
  • 52
0
votes
1 answer

Vee-Validate validation groups

i using vee-validate of my project. But I'm hanging out. I have 3 input fields. When only 1 of these fields is valid, the other inputs must be valid. Ex. Like jquery Jquery validation groups
1 2 3
40
41