Validate correlated configuration fields as exact pairs
When two configuration fields jointly select a supported behavior, validating each field against its own enum is insufficient: the Cartesian product may contain combinations the runtime cannot handle. Model supported combinations as a discriminated union or an explicit exact-pair allowlist, then reject known values paired incorrectly. Keep version compatibility explicit so legacy shapes normalize to their original semantics rather than silently gaining new behavior. This is a contract-validation rule, not a substitute for downstream authorization or safety checks.
Applies when: JSON configuration uses multiple correlated discriminants to select runtime behavior. Keywords: configuration schema discriminated union exact pairs enum validation Zod