Condition for checking param is not falsy?
robross0606 opened this issue · 1 comments
robross0606 commented
I need to ensure a parameter, if provided, does not contain a falsy value (''
, 0
, false
, null
, undefined
, etc.). As far as I can tell, the "notEquals" operator would be unwieldy because it uses !==
so I'd have to check each possibility separately. Is that the only built-in way? Must this be a custom operator?
robross0606 commented
I tried creating a custom operator for this, but the rules engine still requires that I specify a value
on the condition which doesn't make sense for this operator.
"Condition: constructor \"value\" property required"
So how would I use the current engine, rules and conditions simply to check if something is truthy or falsy?