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

Vuelidate Validate Based on Two Fields

In Vue, I have to fields: date and time. I want to create a custom validator and assign it to the time field. The custom validator should check that the time is in the future. This validator will depend on the time value and the date value. In other…
Software Dev
  • 910
  • 3
  • 10
  • 27
4
votes
1 answer

Vuelidate password and confirm password in Vuejs?

export default { name: "HelloWworld", data: function () { return { isHidden: false, isWelcome: false, isFadeout: false, } }
//some code for screen1
T dhanunjay
  • 790
  • 1
  • 13
  • 46
4
votes
1 answer

Vuelidate $v is undefined in Vue component

Nothing I've found has fixed this issue. I am getting the following error for this Vue component. I am trying to use the Vuelidate library to validate my form. Any idea what I am missing here? Uncaught TypeError: Cannot read property '$v' of…
GlobalJim
  • 1,149
  • 2
  • 16
  • 24
4
votes
1 answer

How do I check two regex values with vuelidate

I'm trying to validate an input field with vuelidate. I need it to return valid if either of the following regular expressions is true. const val1 = helpers.regex('val1', /^\D*7(\D*\d){12}\D*$/) const val2 = helpers.regex('val2',…
deeej
  • 357
  • 1
  • 6
  • 22
4
votes
2 answers

How to validate email addresses using vuelidate?

How to validate emails? Would you please show an example with an error message? Documentation does not give enough details. It seems there is nothing like v-if="!$v.user.email.email" Following code does not work either validations: { user: { …
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
4
votes
1 answer

Proper way to use Vuex with Vuelidation

I'm working on a Vue front end for an application that requires all form data be persisted locally before submitting to the backend in case a network connection issue causes an interruption of service. I'm using Vuex to maintain all the form data…
richbai90
  • 4,994
  • 4
  • 50
  • 85
4
votes
1 answer

Vuelidate requiredUnless - Only one input is required to be filled in

I have three inputs jobApplyEmail, jobApplyPhone, jobApplyOther which I am validating with Vuelidate. Of these three inputs, users are required to enter at least one input. To achieve this I am using requiredUnless however it's not working for some…
Simon
  • 653
  • 3
  • 14
  • 25
4
votes
2 answers

How do I use vuelidate with an array of objects?

I have an array of objects that I loop through in my form questionnaire. There are five properties in each object, but only one property requires validation. I set up the validations part of the component as below: specificGifts: { $each: { …
VikingBarrister
  • 109
  • 3
  • 5
4
votes
2 answers

Vue :state, what is this?

i was using https://bootstrap-vue.org/docs/reference/validation#vuelidate and i came across with :state as a vue attribute. i didn't found anything in the docs and i am confused. where is it come from and what does it do? actually seems like i need…
Deniz
  • 1,435
  • 14
  • 29
4
votes
3 answers

[Vue warn]: Property or method "$v" is not defined on the instance but referenced during render

I use Vue.js for validation but it throws an error: vue.esm.js?a026:628 [Vue warn]: Property or method "$v" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for…
Mama
  • 475
  • 1
  • 10
  • 26
4
votes
3 answers

How to properly add custom validation to array in vuelidate

I have an array of objects with the following structure varientSections: [ { type: "", values: [ { varientId: 0, individualValue: "" } ] } ] I created a custom validation called…
Issaki
  • 1,012
  • 2
  • 19
  • 35
4
votes
0 answers

Dynamic collection validation with vuelidate

i have a variable items(array of objects) with 3 attributes for every item (value, other and otherKey), for every item, the value field is required, the other field is required only if value field value is equal to otherKey field. Look the example…
AldoZumaran
  • 547
  • 5
  • 23
4
votes
1 answer

Vuelidate server side validation

I'm trying to combine both frontend and backend validation. For example, on a registration form where the user enters an email there's an email validator on the frontend and a unique validator on the backend. If the backend fails then the error…
bdoubleu
  • 5,568
  • 2
  • 20
  • 53
4
votes
0 answers

Using Vuelidate with v-for and props

How are you all using Vuelidate with v-for. I can't seem to get it to work correctly. It either validates each of the text-fields in my form, or it throws an error. I only want it to validate the field that is being entered, and not other fields…
ToddT
  • 3,084
  • 4
  • 39
  • 83
4
votes
1 answer

Vue js vuelidate custom validation

I'm creating basic stock management system. In there, the invoicing I want to validate, the price user enter must be greater than or equal to the minimum selling price. I use vuelidate package for the validations. Any clue how to achieve this using…
margherita pizza
  • 6,623
  • 23
  • 84
  • 152
1 2
3
23 24