1 year ago
#353470
Ayoub Aarab
Vee-validate: Schema validation with dynamic parames
i wan t to create schema validation, with dynamic params use vee-validate in vue js. but the issue is my methods and computed property be undefined in the schema. here is my code. `
export defaults {
data() {
const self = this;
return {
fixedSchema: {
fixed: `required|min_value:0|max_value:${self.subTotal()}`,
}
}
},
methods: {
subTotal() {
return 56;
}
}
}
the idea is to create validation schema with dynamic property.
vue.js
vee-validate
0 Answers
Your Answer