fields.json mandatory versus forbidden - how to understand the rules? #177
-
Hello, As you know, in the ”fiels.json” file there are rules for many of the forms elements. We have rules that sets mandatory fields and forbidden fields. I need some help because I'm a little bit confused by an apparent contradiction: for example field "BT-109 Framework Duration Justification" is always mandatory in notice sub type 16 (no condition for mandatory) but in the same time it is forbidden in the same notice if certain conditions are met. How to interpret this? Something like: ”The field is mandatory unless forbidden!” or, as in my example, ”Filed BT-109 is forbidden if conditions are met else is mandatory for sub type 16.” |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello, This is explained a bit in the following page (scroll down to find a "Caution" box): |
Beta Was this translation helpful? Give feedback.
-
Hi @alexmohora, I will give you the same answer as @bertrand-lorentz slightly rephrased to make sure it is clear to you and everyone else who reads this. The two types of rule (forbidden/allowed vs mandatory/optional) are totally independent. So, first you check if a field is allowed or forbidden. If it is allowed (not forbidden), then you can check if it is mandatory or optional. Regards, |
Beta Was this translation helpful? Give feedback.
Hello,
Your interpretation is correct. In your example, for notice subtype 16, "BT-109 Framework Duration Justification" is forbidden if the condition is true, and if it is not forbidden, then it is mandatory.
This is explained a bit in the following page (scroll down to find a "Caution" box):
https://docs.ted.europa.eu/eforms/1.2.1/fields/index.html#_dynamic_properties