# validate_rule · FT4 Rell API · Chromia Docs (concept)

> function validate_ rule(rule: rule_expression ) Checks that the rule is sensible. This means that the rule does not expect: block height or timestamp to be

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/validate_rule/

FUNCTION

# validate\_rule

```signature
function validate_rule(rule: rule_expression)
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/accounts/auth_descriptor_rule_validation.rell#lines-391)

Checks that the rule is sensible. This means that the rule does not expect:

* block height or timestamp to be negative
* `op_count` to be zero or negative

It also rejects `op_count` rules with operators that are not `lt` or `le`.

Throws `"INVALID RULE"` if:

* the rule variable is `block_height` and the value is less than 0
* the rule variable is `block_time` and the value is less than 0
* the rule variable is `block_height` and the operator is neither of `lt` and `le`
* the rule variable is `op_count` but the requirement would never be satisfied, i.e.:
  + `op_count`, `lt`, any value below two
  + `op_count`, `le`, any value below one

The first authentication attempt will be checked against an `op_count` value of 1, not 0.

**Parameters**

* **rule** — the rule to check

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.accounts/validate_rule.html)Generated API reference, mirrored from the live docs
