You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/dictionary/README.md
+21-12Lines changed: 21 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -142,12 +142,12 @@ The `then` object contains the restrictions that will be applied when the `if` c
142
142
143
143
A requirement condition is defined by providing a field name or list of field names from this schema, and the matching rules that satisfy this condition. If multiple field names are provided, a `case` property can be added to specify how many of their values must pass the matching rules (`all`, `any`, or `none` of them).
144
144
145
-
| Property | Required | Default | Type | Description| Example |
|`fields`| Required ||`Array<NameString>`| Names of fields from the same schema. This match rule will be applied to all fields listed - see `case` to determine the rules for how many of these fields must match. All specified fields must store values of the same type. |`["some_field"]`|
148
-
|`match`| Required ||`MatchRules` object | Matching rules for the values of the `fields`. All rules included in this object will be tested and all must be pass - this is not affected by the `case` property. [Conditional Match Rules](#conditional-match-rules)|`{ "value": "Hello World" }`|
149
-
|`arrayCase`| Optional |`all`|`all`, `any`, `none`, or [`RangeRule`](#rangerule-data-structure)| When the specified field(s) are an array type, the `arrayCase` dictates how many of the values in the array must pass the matching rules. `all` requires all values in the array to pass the matching rule. `any` requires at least one value in the array to match. |`any`|
150
-
|`case`| Optional |`all`|`all`, `any`, `none`, or [`RangeRule`](#rangerule-data-structure)| Defines how many of the listed `fields` must have a value that matches the `match` rules. `all` requires all fields values to have matching values. `any` requires at least one field to have a matching value. `none` requires that there none of the specified fields have values that match. |`any`|
145
+
| Property | Required | Default | Type | Description| Example |
|`fields`| Required ||`Array<NameString>`| Names of fields from the same schema. This match rule will be applied to all fields listed - see `case` to determine the rules for how many of these fields must match. All specified fields must store values of the same type.|`["some_field"]`|
148
+
|`match`| Required ||`MatchRules` object | Matching rules for the values of the `fields`. All rules included in this object will be tested and all must be pass - this is not affected by the `case` property. [Conditional Match Rules](#conditional-match-rules)|`{ "value": "Hello World" }`|
149
+
|`arrayFieldCase`| Optional |`all`|`all`, `any`, `none`| When a specified field is an array type, the `arrayFieldCase` dictates how many of the values in the array must pass the matching rules. `all` requires all values in the array to pass the matching rule. `any` requires at least one value in the array to match. `non` requires that none of the values in the array match.|`any`|
150
+
|`case`| Optional |`all`|`all`, `any`, `none`| Defines how many of the listed `fields` must have a value that matches the `match` rules. `all` requires all fields values to have matching values. `any` requires at least one field to have a matching value. `none` requires that there none of the specified fields have values that match.|`any`|
151
151
152
152
> **Example Conditional Restriction**: match single value
153
153
>
@@ -241,15 +241,24 @@ A `RangeRule` cannot include but an inclusive and exclusive version of min, or o
| `fields` | Required | | `string` or `Array<string>` | The field(s) that the values of will be compared to. These fields will be refered to throughout this section as _compared to_ fields. All these fields need to be the same type as the field(s) they will be compared to. |
247
-
| `relation` | Required | | `equal`, `not_equal`, `contains`, `contained_in`, `greater_than`, `lesser_than` | The relation between the values of the test field and the compared to fields. See [ComparedFieldsRule Relations](#comparedfieldsrule-relations). |
248
-
| `case` | Optional | `all`, `any`, `none`, or [`RangeRule`](#rangerule-data-structure) | MatchCase (RangeRule or one of: `all`, `any`, `none`) | How many of the _compared to_ fields must pass the comparison for this rule to pass. |
| `fields` | Required | | `string` or `Array<string>` | The field(s) that the values of will be compared to. These fields will be refered to throughout this section as _compared to_ fields. All these fields need to be the same type as the field(s) they will be compared to. |
247
+
| `relation` | Required | | `equal`, `notEqual`, `contains`, `containedIn`, `greaterThan`, `greaterThanOrEqual`, `lesserThan`, `lesserThanOrEqual` | The relation between the values of the test field and the compared to fields. See [ComparedFieldsRule Relations](#comparedfieldsrule-relations). |
248
+
| `case` | Optional | `all`, `any`, `none`| MatchCase (RangeRule or one of: `all`, `any`, `none`) | How many of the _compared to_ fields must pass the comparison for this rule to pass. |
249
249
250
250
#### ComparedFieldsRule Relations
251
251
252
-
**`equal`**:
252
+
| Relation Value | Allowable Field Types | Description |
| **`equal`**: | all | Checks that the current field and the comapred field(s) have the same value |
255
+
| **`notEqual`**: | all | Checks that the current field and the comapred field(s) do not have the same value |
256
+
| **`contains`** | `string` | Checks that the value of the current field completely contains the value of the compared field(s) |
257
+
| **`containedIn`** | `string` | Checks that the value of the current field is completely contained in the value of the compared field(s) |
258
+
| **`greaterThan`** | `number`, `integer` | Checks that the value of the current field is greater than (exclusive) the value of the compared field(s). |
259
+
| **`greaterThanOrEqual`** | `number`, `integer` | Checks that the value of the current field is greater than or equal to the value of the compared field(s). |
260
+
| **`lesserThan`** | `number`, `integer` | Checks that the value of the current field is lesser than (exclusive) the value of the compared field(s). |
261
+
| **`lesserThanOrEqual`** | `number`, `integer` | Checks that the value of the current field is lesser than or equal to the value of the compared field(s). |
0 commit comments