title: FluentValidation Custom Extension Method with Parameters from Base Entity
body: <p>I'm using FluentValidation for server validation and one of the validation uses a custom extension method with a parameter. Said method is going to require a few more parameters from the root object (entity).</p>
  <p>Currently the code is:</p>
  <pre><code>RuleFor(entity =&gt; entity.A).CustomExtension(&quot;test&quot;)
  
  ...
  
  public static IRuleBuilder&lt;T, string&gt; CustomExtension&lt;T&gt;(this IRuleBuilder&lt;T, string&gt; builder, string someValue){
  
  </code></pre>
  <p>I need to change this so that...</p>
  <pre><code>RuleFor(entity =&gt; entity.A).CustomExtension(entity.PropertyB) //&lt;- basically need to pass a entity property as variable
  
  public static IRuleBuilder&lt;T, string&gt; CustomExtension&lt;T&gt;(this IRuleBuilder&lt;T, string&gt; builder, string propertyA){
  }
  </code></pre>
  <p>Greatly appreciate any help!</p>