So, do you already change the required property of your fields? required is read & write
that means you can do something like
setFormCondition(conditionNumber) {
if(conditionNumber === 1) {
$w("inputA").required = true;
$w("inputB").required = true;
$w("inputC").required = false;
$w("inputD").required = false;
} else {
$w("inputA").required = false;
$w("inputB").required = false;
$w("inputC").required = true;
$w("inputD").required = true;
}
}
This will help in the case the element is hidden and has no value. (other validators won’t run on empty fields)
If this does not help, do you mind sharing your code or some simplified version so we have better understanding ![]()