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

New Post: Access to rule Expression from ValidationFailure

$
0
0
There isn't really a way to do this. The ValidationFailure objects are intentionally kept very simple so they can be easily serialized - I'm not keen on exposing additional parts of the rule from these. I think your best bet would be to introduce a custom Validate method your own base class that derives from AbstractValidator, which could then return a custom ValidationResult rather than using the built in one.

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>