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

New Post: WithLocalizedMessage overload with instance of type being validated?

$
0
0

Yes, this is indeed possible. There's a separate overload of WithLocalizedMessage that you can use. The first argument must always point to the resource, then subsequent arguments can be expressions that reference properties. Eg:

.WithLocalizedMessage(() =>  PersonStrings.ValidatieFrequentieTpVerplicht, x => x.SomePropertyOfPerson)


Viewing all articles
Browse latest Browse all 1917

Trending Articles



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