vuelidate $each property code example
Example 1: vuelidate array of items
validations() {
return {
systems: {
circuit: {
$each: {
name: {
required
},
fluid: {
value: {
required
},
unit: {
required
}
},
}
}
}
}
}
Example 2: vuelidate custom validation
const price_greater = (value, vm) => (value >= vm.min_price);
validations: {
user_price: {
required,
price_greater
}
}