This Commented CUE demonstrates how to negate a disjunction. This allows a field to be constrained such that evaluation is only successful if the field’s value would not be permitted by the disjunction.

example.cue
package example

// This disjunction permits a single value from a
// small set of options.
#OneTwoThree: "one" | "two" | "three"

A: "three"
B: "four"

// These hidden fields ensure that the data fields
// they reference do not contain values permitted
// by the #OneTwoThree disjunction.
_A_ok: true & ((A & #OneTwoThree) == _|_)
_B_ok: true & ((B & #OneTwoThree) == _|_)
TERMINAL
$ cue vet
_A_ok: conflicting values false and true:
    ./example.cue:13:8
    ./example.cue:13:16