Is it possible to access a data element within a rule
?
Click here to see my code in action
I'm attempting to change the value of a data
element on a text field rule within a Vuetify form.
While the rule itself is functioning properly, I'm encountering an issue when trying to access the data element. Specifically, this error message appears:
TypeError: Cannot set property 'disabled' of undefined
Below is a snippet of my code:
data: function() {
return {
disabled: false,
rules:{
sellerId(value){
if(value.length == 0){
this.disabled = true;
return "What are you trying to do here?";
}
else{
return true;
}
}
},
Can someone help me identify what mistake I might be making?