public void CustomAsync_within_ruleset() { var validator = new InlineValidator <Person>(); validator.RuleSet("foo", () => validator.CustomAsync(async x => new ValidationFailure("x", "y"))); validator.RuleSet("bar", () => validator.CustomAsync(async x => new ValidationFailure("x", "y"))); var result = validator.ValidateAsync(new Person(), ruleSet: "foo").Result; result.Errors.Count.ShouldEqual(1); }