title: Fluent Validation - Is there a way to run async action on When?
body: <p>I am trying to display the error message from DB so this is what I got so far: </p>
  
  <pre><code>        When(c =&gt; c.Type.Equals("new"), async () =&gt;
          {
              var errors = await _repository.ErrorsRepository.Get();
  
  
              RuleFor(c =&gt; c.AnotherProperty)
                              .NotNull()
                              .WithMessage("Must select Yes or No for '" +
                              $"{errors.FirstOrDefault(l =&gt; l.id.Equals("anotherProperty"))?.error}'");
              RuleFor(c =&gt; c.AnotherProperty2)
                              .NotNull()
                              .WithMessage("Must select Yes or No for '" +
                              $"{errors.FirstOrDefault(l =&gt; l.id.Equals("anotherProperty2"))?.error}'");
              RuleFor(c =&gt; c.AnotherProperty3)
                              .NotNull()
                              .WithMessage("Must select Yes or No for '" +
                              $"{errors.FirstOrDefault(l =&gt; l.id.Equals("anotherProperty3"))?.error}'");
  
          });
  </code></pre>
  
  <p>When I run validateAsnc(), I get the following error:</p>
  
  <blockquote>
    <p>An asynchronous module or handler completed while an asynchronous
    operation was still pending.</p>
  </blockquote>
  
  <p>I am assuming is due to the async action.</p>
  
  <p>EDIT Running Validation:</p>
  
  <pre><code>   ...       
     var validator = new objValidator();
     var validationTask = validator.ValidateAsync(obj);
  
      ModelState.Clear();
  
      var result =  await validationTask;           
      result.AddToModelState(ModelState, null);
  
      if (ModelState.IsValid)
      ...
  </code></pre>