Constraining values using other fields #1840
Replies: 3 comments 1 reply
-
Hi @PeterKraus - not sure I follow your example. Is your yaml showing example data or kind of a sketch of a schema? This might be something that rules can help with: |
Beta Was this translation helpful? Give feedback.
-
Hi @PeterKraus - I'm not sure I understand your question fully. As a very simple example: are you asking if LinkML schema syntax supports a use case like: "if slot_a > 2, then slot_b must be 'false' and if slot_a < 2, slot_b must be 'true'"? |
Beta Was this translation helpful? Give feedback.
-
e.g.
|
Beta Was this translation helpful? Give feedback.
-
Dear LinkML team,
we would like to constrain the values a certain slot can have, based on the values in a different slot higher up the schema. As an example:
We don't know what the
all_supported_cases
are in advance (so I'm not sure how to write anEnum
), but we want to make sure that there are no entries listed in the individualsupported_cases
that are also not included in theall_supported_cases
. What is the best way of doing this?Thanks!
Peter
Beta Was this translation helpful? Give feedback.
All reactions