Switch to new rules definition format
mavarazy opened this issue · comments
Rules need to be split into 2 fields action to perform and conditional when to perform specified action, like this
let rules = {
telephone: {
action: "remove",
when: {
age: {
greater: 5,
less : 70,
}
}
}
}
This helps readability of the rule engine and improves maitainability