This project is read-only.
1

Closed

Removing Rule not gets removed from ruleValidationResultMap

description

Hi,

I tried to removed a single rule from the Validator.
var rule = Validator.AddRule(() => Password ,
                    () => RuleResult.Invalid("Incorrect password."));
Validator.Validate(() => Password);
Validator.RemoveRule(rule);
Validator.GetResult(() => Password);
The rule is removed, but when I validate again, I still get notified of the removed rule.
I checked the code and it seems, Removing a rule, removes it from the RuleCollection, but not from ruleValidationResultMap, a dictionary you maintain.

Please help, is there other way of removing a rule. So that I should not get notified of the removed rule.
Closed Jan 7, 2014 at 9:31 PM by pglazkov

comments