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

New Post: checking for multiple values in when condition

$
0
0
RuleFor(x => x.Forename).NotEmpty().When(x => new[] { "FOO", "BAR", "BAZ" }.Contains(x.Surename));

Viewing all articles
Browse latest Browse all 1917

Trending Articles



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