Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

New Post: Validating Object Graphs

$
0
0
Hmm yes, so this does happen in the validator's constructor, not actually at the time of validation, so marking the entity itself as already validated won't actually help. Essentially your validator definitions are doing this:
class Validator() {
  public Validator() {
    new OtherValidator();
  }
  
  public void Validate() { }
}


class OtherValidator() {
  public OtherValidator() {
    new Validator();
  }
}
I'll have a think about how this can be solved, but I would personally explicitly define the validators rather than generating them - this gives you a lot better control of what you're actually validating.

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>