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

Created Unassigned: ValidatorType Replace- RemoveRule [7143]

$
0
0
What type is the following validator:

RuleFor(x => x.Surname).Length(1, 140).Unless(MyUnlessMethod);

The Replace/RemoveRule methods needs a type, but when I supply it with typeof(LengthValidator) it doesn't work.

Basicly I want to be able to have a ruleset which specifies the length not to be 1 to 140but 1 to 70.
But in both cases and I need to be able to ignore the rule when the Unless case is met.



Viewing all articles
Browse latest Browse all 1917

Trending Articles



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