title: FluentValidation Multiple error messages for one property
body: <p>i am validating input values with FluentValidation. i am using a method to validate value from database which return's integer value -1, -2 and -3 for different error messages on the base of value. how can i display error message according to the return value from method. i made a variable in class scope and set the return value and in next statement i tried comparison and try to display the message but i observe that next statement is executed before the updating value.</p>
  
  <p>i want to display different error messages for one input value.</p>
  
  <p>for example user input a negative value error message should be "negative values are not allowed",
  if user input a large value number then message should be "number is too long".</p>
  
  <p>here is code  <strong>ISValidAction</strong> is method which validates the input and set the variable returnvalue this method always returns true.</p>
  
  <pre><code>int returnvalue = 0;
  RuleFor(r =&gt; r.action).Must(ISValidAction).WithMessage("Action does not exist in the system.").When(r =&gt; !String.IsNullOrEmpty(r.action));
  
  RuleFor(r =&gt; returnvalue).Must(r =&gt; !(returnvalue != 1 &amp;&amp; returnvalue != -2 &amp;&amp; returnvalue != -3)).WithMessage("");//for -1
          RuleFor(r =&gt; returnvalue).Must(r =&gt; !(returnvalue != 1 &amp;&amp; returnvalue != -1 &amp;&amp; returnvalue != -3)).WithMessage("");//for -2
          RuleFor(r =&gt; returnvalue).Must(r =&gt; !(returnvalue != 1 &amp;&amp; returnvalue != -1 &amp;&amp; returnvalue != -2)).WithMessage("");// for -3
  </code></pre>