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

New Post: Rule GreaterThan and WithMesssage

$
0
0
Hi

It sounds like the GreaterThan rule isn't actually executing.

If the property is a non-nullable value type (such as an int) then MVC will look for and try to invoke a Required rule before it will run any other rules (this is a requirement of MVC, not of FluentValidation). You can get around this by adding a NotNull rule for the CountryId.

Viewing all articles
Browse latest Browse all 1917

Trending Articles



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