I have a validation on a dateField that I am trying to use a rule inside of the if statement. See below.
validations: { if( and( rule!someRuleThatDoesntWorkHere(a, b, c), rule!someRuleThatWorks(a) ), "message goes here", {} ) }
I get a "Cast Invalid Could not cast from Rule or Function Reference to Boolean" when I add the first rule. Is there something I should look for specifically.
Discussion posts and replies are publicly visible
At first glance the syntax looks valid - when you open the first rule and run it, does it return a valid (Boolean type) output?
Yes. It does return a boolean output.
Also check to verify that it still returns a valid boolean response (and not, for example, nulls or an error) for all possible values of "a, b, c" that could be passed in from your interface. That would include passing in nulls, incorrect values, etc.
Also you could post the code for the rule that doesn't work, and/or a screenshot of its output.