Support boolean logic for multiple fields
mavarazy opened this issue · 0 comments
mavarazy commented
#4 is enough for simple cases of comparison related for a single field, but in case we need to interact with multiple fields, it's not enough.
For example, we want to hide password field, when firstName
is missing or nickName
is admin
.
We can express this like this:
let rules = {
password: {
action: "remove",
when: { "or" : [ { firstName: "empty"} , { nickName: "admin" } ] },
}
}