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
0 answers

Vuelidate Custom Validator

I am trying to get the Vuelidate custom validator provided by the docs to work with my Vutify This is the line of code from the docs const mustBeCool = (value) => value.indexOf('cool') >= 0 When I add it to my validators like so it doesnt seem to…
Jamie
  • 428
  • 6
  • 24
0
votes
1 answer

Validate if checkbox is checked depending on another validation in vuelidate

I'm just starting with Vue and vuelidate. I have a form which shall work in the following way: The form shows a Yes/No radio button group. If the radio button "Yes" is selected then the form shows a checkbox. The submit button for the form shall be…
Robert Strauch
  • 12,055
  • 24
  • 120
  • 192
0
votes
1 answer

Pass a dynamic string value to vuelidate $v object - Vue

Trying to work out how to pass a string into to a vuelidate $v form element look up? EG this.$v.appliance.required Where appliance would be a string. I know that in Angular there is a getter .get(...).required I've checked the Vuelidatedocs and…
fidev
  • 1,222
  • 2
  • 21
  • 51
0
votes
1 answer

Validate one of two forms

I was able to use vuelidate very well to validate my forms. Now I have two tabs and in one tab a form to login and on another tab a form to register. I have to validate only one of two forms. When I switch to the login form, the form should be only…
user866933
  • 305
  • 1
  • 6
  • 16
0
votes
0 answers

How to use $each.$iter within vuelidate

I raised an issue with vuelidate https://github.com/vuelidate/vuelidate/issues/388 and was given a response. Refrain from looping the $each.$iter property and using it to v-model data to it. I am however unsure what the best approach is to use…
Ginger Wizard
  • 717
  • 4
  • 13
0
votes
1 answer

Vuelidate date input

I'm using vuelidate in my vue app. I want to set validation for date minDate for one week from now and maxDate for 3 months from now.
BT101
  • 3,666
  • 10
  • 41
  • 90
0
votes
1 answer

v-checkboxes are true when the page is loaded

I am doing form validation in vuelidate. I have a group of checkboxes. There are other fields also in the form. I want to show the success-messages of the checkbox only when a checkbox is checked. But the success-messages are showing when the page…
Boidurja Talukdar
  • 676
  • 2
  • 21
  • 42
0
votes
1 answer

Form validation in vuelidate

I am doing form validations in vuelidate. I have a date picker in my form which is not a mandatory field. Yet I cannot submit the form without selecting a date from the date picker. How is it so? Can anyone tell me how to fix it? I want to keep the…
Boidurja Talukdar
  • 676
  • 2
  • 21
  • 42
0
votes
3 answers

Is it possible to bind a class to an element based on a boolean expression?

I want to bind a class to an element based on the result of a boolean expression. For example: But the "invalid" class is not added to the element if I evaluate both…
bumbleshoot
  • 1,082
  • 2
  • 17
  • 32
0
votes
1 answer

Strange behaviour of collection-validation in vuelidate

I have made the following minimal example, which can also be tested in this fiddle: HTML:
Nils-o-mat
  • 1,132
  • 17
  • 31
0
votes
0 answers

Vuevalidate plugin -$v is not defined in single file component

Have some problem when try to use vuelidate plugin in single file component app.js import Vue from 'vue'; import Vuelidate from 'vuelidate'; Vue.use(Vuelidate) const T = new Vue({ router: router, template: '
Romarch
  • 1
  • 3
0
votes
0 answers

Vuelidate get vue instance

I am using vuelidate, and it is working perfect. But I want to do a request in a custom validator. See the code: validations: { partnumberValue: { required, isValid(value) { if (value.length < 12 || value.length > 12) return false; …
da1lbi3
  • 4,369
  • 6
  • 31
  • 65
0
votes
1 answer

Vuelidate - Error Validation Logic

On the official example of vuetify's form validation (using vuelidate) there's
mremane
  • 103
  • 2
  • 9
0
votes
1 answer

Can't determine reference in a posted example

I'm trying to use the Vuetify Form with validation and have tried to use the example at https://vuetifyjs.com/en/components/forms (Example: #vuelidate) as a starting point. In the script, the example references a '$v' which I presume is a validation…
user1104605
  • 97
  • 1
  • 8
0
votes
3 answers

Vuelidate empty object on select validation issue

I would like to know how to validate empty object using vuelidate. I tried to give a demonstration on jsfiddle as links follows Vue.use(window.vuelidate.default) const { required, minLength } = window.validators new Vue( { el: "#app", …
agriboz
  • 4,724
  • 4
  • 35
  • 49
1 2 3
23
24