Context-sensitive validation / validation with parameters

interface Thing {
  bars: string[];
  foo: { baz: { bar: string }[]; }[];
}

What is the best/easiest way to write a validator which ensures that all bars are present in bars?
Was this page helpful?