are_rules_violating

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

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

rule_expression

for an explanation of rule violation

account_auth_descriptor.rules

to understand the conditions under which this function throws.