From bce2cc3181a0f8215ccf654f5343e0f3bbd38d86 Mon Sep 17 00:00:00 2001 From: sel Date: Wed, 26 Nov 2025 16:28:05 +0100 Subject: [PATCH] fix in object.md: clarified the `conditions` section also fixed a dead link at the end of object.md --- object.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/object.md b/object.md index 1bec6c8..c991900 100755 --- a/object.md +++ b/object.md @@ -151,7 +151,7 @@ array of templates and their properties under `input` that this property matches ### `conditions` -must be referring to another property (can be itself). array of values that property must have for this property to be valid in the object instance. **this is mostly there for `input.variant` shenanigans and is NOT to be used for data validation!** +must be referring to another property (can be itself). array of values that property must have for this property to be valid in the object instance. **this is mostly there for `input.variant` shenanigans and is NOT to be used for advanced data validation!** an example would look like this: @@ -162,8 +162,19 @@ conditions = [ ] ``` +if a property is referenced multiple times, all of the provided options will be valid (example from `meta/connection`): + +```toml +conditions = [ + ["input.variant", "function"] + ["input.variant", "transform"] + ["input.variant", "subobject"] + ["input.variant", "custom"] +] +``` + ### `duplicates` boolean indicating if this property can be duplicated. -if `true`, it will use an array when represented in json. it can only contain properties specified in `transforms`. when used as transform destinations, duplicable properties add the source property's value to the first (0th) position, and the remaining positions can be filled later by [functions](functions.md). +if `true`, it will use an array when represented in json. it can only contain properties specified in `transforms`. when used as transform destinations, duplicable properties add the source property's value to the first (0th) position, and the remaining positions can be filled later by [calculators](modularity.md#calculator).