FUNCTION

are_rules_violating

function are_rules_violating(rules: gtv, variables: map<text, gtv>): boolean

Checks whether any of the rules in the gtv are violated currently.

Throws "INVALID RULE" if the gtv does not start with "and", implying it's a simple rule, but the length is not 3 (operator, variable and value).

Parameters

  • rules — the gtv rules to check.
  • variables — the state to check the rules against.

See Also

© 2024 Chromia