rules
rules copied to clipboard
Generic Rules engine in golang
Hello, how can i evaluate the value inside array? maybe for some object like this ``` { "data": [ { "key": "val1" }, { "key": "val2" }, ... ] }...
Hi, I'm using this amazing engine in a project that need to apply rules based on date. I'm doing rules like this: `"CurrentDate < 1610016640 and CurrentDate > 1110016640"` It...
It would be great if basic mathematical operations can be accommodated in the grammar. E.g. x+4 eq 10 x%20 eq 1
Copied the entire module into the v2 subdirectory. Ran `go mod tidy` to make sure I didn't miss changing any imports to v2.
The following are supposed to be working according to README.md but not. @nikunjy `parser.Evaluate("x eq 1 OR x eq 2", map[string]interface{}{"x": 1})` It would be nice to support `||` and...
Given an input of `{"x": "abc", "y": "11.3.0"}`, I expect these two rules to behave the same: - `y gt 11.1.0-0 and not(x IN ["cde","fgh"])` - `not(x IN ["cde","fgh"]) and...
Hello, Is it possible to validate a rule to check if it has the right format? I came across in the test to this test https://github.com/nikunjy/rules/blob/2151cc25faff60c89f304a6d03fd2a98af553a04/parser/parse_simple_test.go#L26 But the eval function...