I recently got the question, whether its possible to prevent that medini users change the kind of a trace to an arbitrary value or even clear it. Its free text and there is no drop-down so the question is at hand.

To achieve that you can use "live constraints". That basically means to write a constraint that ensures that only wanted trace kinds are set and enable the live mode. In my example that would look like:

The constraint itself evaluates to false, if the kind is neither 'foo' not 'bar' which are the only two values I allow. Checking "Live mode" will lead to the
evaluation of the constraint at each and every change of a trace. That's the dangerous part: if you write the constraint in a wrong way or the evaluation takes a long time, the tool might become unusable.
If the user now enters a wrong value:

A final hint: this validation even works on other contexts, not only when users change something but also during import operations e.g. from DNG or Jama.
Happy Scripting
Jan