Questions tagged [vuelidate]

Use this tag to ask questions related to the validation library vuelidate.

Vuelidate is a simple, lightweight model-based validation for Vue.js 2.0

348 questions
0
votes
1 answer

Custom validation with Vuelidate Vuejs

I have 4 inputs, all must be required( witch I did, and works), but first input must be equal with the next 3 fields, witch is not working with my current code. (also I get no error in console) import { required, minValue } from…
Beusebiu
  • 1,433
  • 4
  • 23
  • 68
0
votes
1 answer

Vuelidate custom validation shows error on every element in $each

I have a formData object with the following structure: { name: '', defaultPort: 1000, protocolPorts: [{ manual_ports: [] }] } manual_ports is an array of string which may be added dynamically. For each such port I want to make a few…
Igal
  • 5,833
  • 20
  • 74
  • 132
0
votes
1 answer

The submit button should only be clickable when both checkboxes have been activated

I'm using bootstrap-vue and vuelidate. The submit button should only be clickable when both checkboxes have been activated. Unfortunately I can't get it with the checkboxes from bootstrap. https://codesandbox.io/s/lively-sun-246kv
chriswalg
  • 3
  • 2
0
votes
2 answers

Optional nested validation in vuelidate

what is the correct way to add an optional validation object in vuelidate? Given a validation shape of: validations: { vehicles: { $each: { type: { required }, engine: { …
sweetroll
  • 176
  • 2
  • 10
0
votes
1 answer

Using Vuelidate, how to generate error if what the user inputs already exists in db?

I'm creating a form using Vue JS, more specifically the Vuetify framework. I've already created a way to show an error when an item doesn't exist, however how can I make it so that it also shows an error if what the user enters already exists in…
Beginner_Hello
  • 357
  • 6
  • 19
0
votes
1 answer

Vuelidate validates on page render

In our Vue application we are using Vuelidate for form validation. There's this behaviour where the fields are validated just as the page renders, when it should only be validated in form submission, as stated in the docs using $v.invalid and…
Gabriel Silva
  • 69
  • 1
  • 9
0
votes
1 answer

Why does error message pops up for some time when validator method returns true?

I try to simulate async validation with setTimeout method using vuelidate, but when my async method returns true value, error message pops up for some time and then hide. There is code sandbox:…
0
votes
1 answer

How to map a nested Vuelidate validation object with computed properties in VueJS?

I have a tabs container with multiple forms. Some of the fields in all forms have some complex logic that I didn't want to repeat on each form, so I created a custom component that is used in all forms. I'm trying to use Vuelidate to validate all of…
andrux
  • 2,782
  • 3
  • 22
  • 31
0
votes
1 answer

Modal is closing after submit form even if I have errors Vuejs

I created a validation with vuelidate but after I submit the form modal is closing even if I have errors. I am using Bootstrap-Vue with VueJs. I want that the model to be open if I get an error after submit.
Beusebiu
  • 1,433
  • 4
  • 23
  • 68
0
votes
2 answers

ReferenceError: $v is not defined even though vuelidate js scripts are being included

I forked the jsfiddle at https://jsfiddle.net/rstoenescu/waugrryy/ and then added the following lines to it from a work project of mine:
neubert
  • 15,947
  • 24
  • 120
  • 212
0
votes
2 answers

Unable to validate email on each email Value field in an array of objects

I'm trying to validate the the value field in an object contains an email. There could be potentially many of these objects in an array. When I evaluate if it's $dirty it says Value is undefined. The validation is also not working at all. I've never…
Funkel
  • 133
  • 1
  • 6
  • 21
0
votes
1 answer

Form collection validation with dates and string - Vuelidate

I am trying to validate series of dates with something like this. const data = [ {begin: new Date('2019-12-01'), place: '2'}, {begin: new Date('2019-12-03'), place: '3'} ... more values ]; // Elements inside data can be added or removed…
nicholasnet
  • 2,117
  • 2
  • 24
  • 46
0
votes
1 answer

How to create custom start/end date Vue custom validator

I am trying to create a custom Vue validator. I have reviewed their docs https://vuelidate.netlify.com/#custom-validators, as well as a very useful tutorial https://vuejsdevelopers.com/2018/08/27/vue-js-form-handling-vuelidate/. However, I still…
user1015214
  • 2,733
  • 10
  • 36
  • 66
0
votes
1 answer

On form button click success, form validations fire again

Hopefully this is a newbie question. I am using Vuelidate to validate my form and the form validations works fine, when the “send email” button is clicked.However on success, instead of showing me the successful message, the system shows that all…
Ajit Goel
  • 4,180
  • 7
  • 59
  • 107
0
votes
0 answers

Customizing a with label and invalid message

After having read the BootstrapVue documentation for the "form textarea" component am I right that does not support the following attributes to be set? invalidFeedback (as opposed to e.g. ) label If this is correct…
Robert Strauch
  • 12,055
  • 24
  • 120
  • 192