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

New Post: Validating parent field against a field in a collection

$
0
0

Something like this will probably do it:

RuleFor(x => x.Email).Must((email, person) => person.Friends.All(x => x.Email != email));

Jeremy


Viewing all articles
Browse latest Browse all 1917

Trending Articles



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