Answer the question
In order to leave comments, you need to log in
How to get Vue values?
I looked in the validator , where the rules are set in the form
import { required, minLength, between } from 'vuelidate/lib/validators'
export default {
data () {
return {
name: '',
age: 0
}
},
validations: {
name: {
required,
minLength: minLength(4)
},
age: {
between: between(20, 30)
}
}
}
created: function() {
// `this` указывает на экземпляр vm
console.log("svalidations", this.svalidations);
},
beforeCreate: function() {
console.log("beforeCreated.svalidations", this.svalidations);
},
svalidations: {
email: "email",
pass: "min:3"
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question