Add rule validations

Validations are added to ensure that created rules are following the
structure defined.

Bug: 141979167
Test: atest RuleTest
Change-Id: I5b54c1a61703e52abeedc3349192a1512f209a57
3 files changed