rules vuelidate code example
Example 1: npm install vuelidate
npm install vuelidate --save
Example 2: vuelidate required if another props
elements: {
$each: {
type: {
required,
},
question: {
required: requiredIf(prop => prop.type === 'input'),
}
}
}