Empty Operators
Empty operators check whether a value is present or absent.
Is Empty
Section titled “Is Empty”Checks if a value is empty, null, or missing:
__notes__ of **Order** is emptyInteractive Example
Policy Rule
Test Data (JSON)
Is Not Empty
Section titled “Is Not Empty”Checks if a value is present and non-empty:
__email__ of **User** is not emptyInteractive Example
Policy Rule
Test Data (JSON)
What Counts as Empty
Section titled “What Counts as Empty”| Value | is empty | is not empty |
|---|---|---|
"" (empty string) | true | false |
null | true | false |
| missing key | true | false |
"hello" | false | true |
0 | false | true |
false | false | true |
Common Pattern: Required Fields
Section titled “Common Pattern: Required Fields”Use is not empty to enforce required fields:
Interactive Example
Policy Rule
Test Data (JSON)