I have a component that has two props, but in order to be valid only one of them should be provided.
Example:
// either `email` or `phone` should be passed (but not both)
props: {
email: {
type: String,
required: true
},
phone: {
type: String,
required: true
},
}
Is there a way to validate props based on each other?
I'm thinking of putting this somewhere in a lifecycle hook, but it feels out of place.