title: Using FluentValidation's WithMessage method with a list of named parameters
body: <p>I am using FluentValidation and I want to format a message with some of the object's properties value. The problem is I have very little experience with expressions and delegates in C#.</p>
  
  <p>FluentValidation already provides a way to do this with format arguments.</p>
  
  <pre><code>RuleFor(x =&gt; x.Name).NotEmpty()
      .WithMessage("The name {1} is not valid for Id {0}", x =&gt; x.Id, x =&gt; x.Name);
  </code></pre>
  
  <p>I would like to do something like this to avoid having to change the message string if I change the order of the parameters.</p>
  
  <pre><code>RuleFor(x =&gt; x.Name).NotEmpty()
      .WithMessage("The name {Name} is not valid for Id {Id}", 
      x =&gt; new
          {
              Id = x.Id,
              Name = x.Name
          });
  </code></pre>
  
  <p>The original method signature looks like this:</p>
  
  <pre><code>public static IRuleBuilderOptions&lt;T, TProperty&gt; WithMessage&lt;T, TProperty&gt;(
      this IRuleBuilderOptions&lt;T, TProperty&gt; rule, string errorMessage, 
      params Func&lt;T, object&gt;[] funcs)
  </code></pre>
  
  <p>I was thinking of providing this method with a list of Func.</p>
  
  <p>Anyone can help me with this?</p>