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

New Post: How to add the Property value with the localizemessage

$
0
0
Hi

There are additional overloads for WithMessage and WIthLocalizedMessage that allows you to specify other properties that can be used within the error message. Example:

RuleFor(x => x.FirstName).WithMessage("Test {0}", x => x.StoreName)

...the same is also true if you use WithLocalizedMessage

Viewing all articles
Browse latest Browse all 1917

Trending Articles



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