0👍
You can use a computed
property called rules
to have dynamic rules reactive like you want :
computed: {
rules() {
const isRequired = this.MainForm.mycheckbox === false;
return {
value1: [
{ required: isRequired, message: 'Please input Activity name'},
],
value2: [
{ required: isRequired, message: 'Please input Activity name'},
],
}
}
}
Source:stackexchange.com