title: FluentValidation checking for duplicate entity in a sub-collection
body: <p>I have a <code>MainEntity</code> class and it has a collection of <code>SubEntity</code>. The following is the current validation:</p>
  
  <pre><code>public class MainEntityValidator : AbstractValidator&lt;MainEntity&gt;
  {
      public MainEntityValidator()
      {
          RuleFor(x =&gt; x.SubEntities).SetCollectionValidator(new SubEntityValidator());
      }
  
      public class SubEntityValidator : AbstractValidator&lt;SubEntity&gt;
      {
          public SubEntityValidator()
          {
              RuleFor(x =&gt; x.Field1).NotNull();
              RuleFor(x =&gt; x.Field2).NotNull();
          }
      }
  }
  </code></pre>
  
  <p>How can I add a validation rule so that only unique <code>SubEntity</code> objects (based on <code>Field1</code> and <code>Field2</code>) must be in the collection?</p>