props: {
needsDate: {
type: Boolean,
default: false
},
date: {
type: String,
required: this.needsDate
}
}
The problem is that this form does not generate the expected behavior, when step needsDate = true without passing date the component renders date as undefined instead of throwing an error. Can anyone help me understand why this happens and / or what is the correct way to do it?