vuelidate: requiredIf does not work in combination with other validaitons.
I am having an issue with multiple validations included with a requiredIf validation.
faith: {
requiredIf: requiredIf(() => {
return this.ch_class == 'Paladin'|| this.ch_class == 'Druid'|| this.ch_class == 'Cleric'
}),
alpha,
maxLength: maxLength(25)
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (1 by maintainers)
Implementation is not different. With
validations()it just call validation object with vue component, so you can usethisin your validations. You have only blank page? any errors?You need to use dynamic validations, then
thiswill point to Vue instance, here are docs https://monterail.github.io/vuelidate/#sub-dynamic-validation-schemaHere is your example https://jsfiddle.net/b5v4faqf/7368/