How to mutually exclude two (or more) boolean flags using json shema? <pre><code>{ flag1: true, flag2: false } -&gt; ok { flag1: false, flag2: true } -&gt; ok { flag1: true } -&gt; ok { flag2: true } -&gt; ok { flag1: false, flag2: false } -&gt; ok { } -&gt; ok { flag1: false } -&gt; ok { flag2: false } -&gt; ok { flag1: true, flag2: true } -&gt; NO! </code></pre> <p>I want validation to fail only if both <code>flag1</code> and <code>flag2</code> are equal <code>true</code>.</p>