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

New Post: IValidator.Validate(null)

$
0
0

 

How can I add a rule that an object passed to .Validate(..) cannot be null?

I currently have to do

if(obj==null || !Validator.Validate(obj)) throw new Exception())

 

I want to include the obj==null validation within the validator.


Viewing all articles
Browse latest Browse all 1917

Trending Articles



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