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

New Post: Help with creating a custom validator

$
0
0
Hi to all,

i would like to create a custom validator and i need some help.

My validator needs four parameters (the object being validated, the parent object being validated, a boolean and the PropertyValidatorContext)

The boolean is a property of the parent object being validated, but because this property can be different each time i call the validator I want to give this as parameter using a lambda expression.

Searching on the documentation i found how to create custom validators, but i'm not able/don't know if it's possible to create this kind of validator.

Can someone please help me?

Viewing all articles
Browse latest Browse all 1917

Trending Articles



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