title: How to pass a value into the error message using fluent validation
body: <p>Is it possible to pass a value into the error message. I have tried something like this:</p>
  
  <pre><code>RuleFor(x =&gt; x.ForeName).Length(1, 255).WithLocalizedMessage(() =&gt; String.Format(ValidationErrors.TooLong, "255"));
  </code></pre>
  
  <p>ValidationErrors is my resource file which contains:</p>
  
  <p>TooLong Please use fewer than {0} characters. </p>
  
  <p>This:</p>
  
  <pre><code>RuleFor(x =&gt; x.ForeName).Length(1, 255).WithLocalizedMessage(() =&gt; ValidationErrors.TooLong);
  </code></pre>
  
  <p>works fine.</p>