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

New Post: Apply validator to one item in array

$
0
0

RuleFor(x => x.SomeArrayProperty[0]).SetValidator(new WhateverValidator()).When(x => x.SomeArrayProperty.Length > 0).OverridePropertyName("whatever");


Viewing all articles
Browse latest Browse all 1917

Trending Articles



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