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

New Post: Removing a validator

$
0
0

You don't need the call to Activator.CreateInstance in there - attributes do actually apply to types, not instances. This would be a better check:

if(! Attribute.IsDefined(result.ValidatorType, typeof(DontAutoWireAttribute))) {
 // ... 
}

Viewing all articles
Browse latest Browse all 1917

Trending Articles



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