title: WPF Binding.ValidationRules based on condition
body: <p>I currently have <code>TextBox</code> with a <code>Binding.ValidationRules</code> that work like;</p>
  
  <pre><code>&lt;TextBox&gt;
      &lt;Binding Path="MyID" NotifyOnValidationError="True" ValidatesOnDataErrors="True" 
               Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnSourceUpdated="True" 
               NotifyOnTargetUpdated="True" Delay="100"&gt;
          &lt;Binding.ValidationRules&gt;
              &lt;local:IDValidator ValidatesOnTargetUpdated="True" table="Items"  /&gt;
          &lt;/Binding.ValidationRules&gt;
      &lt;/Binding&gt;
  &lt;/TextBox&gt;
  </code></pre>
  
  <p>And the custom <code>ValidationRule</code>:</p>
  
  <pre><code>public class IDValidator : ValidationRule
  {
      public string table { get; set; }
  
      public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
      {
          //Logic
      }
  }
  </code></pre>
  
  <p>Problem is under certain conditions I would want <code>IDValidator</code> to be the <code>ValidationRule</code>.  Other times I may want say <code>IDValidator2</code> to be the <code>ValidationRule</code>.  </p>
  
  <p>Now I couldn't find a way to accomplish this.  So I figured hey why not send another value down to <code>IDValidator</code> and then handle it in the logic of <code>Validate</code> like this:</p>
  
  <p>XMAL update:</p>
  
  <pre><code>&lt;local:IDValidator ValidatesOnTargetUpdated="True" table="Items" testing="{Binding Path=test}"  /&gt;
  </code></pre>
  
  <p>IDValidator update:</p>
  
  <pre><code>public string testing { get; set; }
  </code></pre>
  
  <p>Problem is that doesn't seem to like sending a bind value down.  How can I accomplish this?</p>