Dean Taler
Dean Taler

Reputation: 773

How to use 'or' in rego OPA

I have a list, and I want to check that every string in the list contains a substring, such as 'a' or 'b'.

allow {
   every x in str_list {
     contains(lower(x), 'a') or contains(lower(x), 'b')
    }
}

The Rego language does not have a or keyword.

How can the condition be achieved?

Upvotes: 0

Views: 43

Answers (0)

Related Questions