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

New Post: Best way to override default validator messages?

$
0
0
Hi

You can override FluentValidation's default error messages by replacing the default resource provider. See the section on "using a custom resource provider type" at the bottom of this page: https://fluentvalidation.codeplex.com/wikipage?title=Localization&referringTitle=Documentation

Essentially, you need to create a resource file to include your new error messages and then tell FluentValidation to use this file by setting ValidatorOptions.ResourceProviderType to your resource provider type.

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>