Validate fields only when certain conditions are met using data-ev-if.
The data-ev-if attribute accepts a condition in the format selector:value. The field is only validated when the target element's value matches.
<!-- Validate only if #country = "PT" -->
<input data-ev-type="nif"
data-ev-required="true"
data-ev-if="#country:PT" />
<!-- Validate if checkbox checked -->
<input data-ev-type="email"
data-ev-if="#newsletter:true" />
<!-- AND: both must be true -->
data-ev-if="#country:PT&#type:business"
<!-- OR: either can be true -->
data-ev-if="#country:PT|#country:ES"
true / false