Is There a Limit to Lightning Formula Parameters?
Yes, it's a known bug/limitation of Expression Operators. You can only evaluate two parameters in and
and or
expressions. You'll probably want to consider setting an attribute evaluated by your controller to determine the final logic behavior as a workaround.
Two things to add:
1) From a JavaScript perspective it makes sense. In JS extra parameters to a function are accepted and ignored. So and(true, true, false)
returns true
because it's a two-parameter function.
2) For what it's worth, you can chain any number of ANDs with &&
but unlike Visualforce you have to escape it to conform with XML rules. So {!true && true && false}
correctly yields false
. Note that for chaining multiple ORs you can just use ||
straight up.