{"action":"closed","issue":{"url":"https://api.github.com/repos/JeremySkinner/FluentValidation/issues/216","repository_url":"https://api.github.com/repos/JeremySkinner/FluentValidation","labels_url":"https://api.github.com/repos/JeremySkinner/FluentValidation/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/JeremySkinner/FluentValidation/issues/216/comments","events_url":"https://api.github.com/repos/JeremySkinner/FluentValidation/issues/216/events","html_url":"https://github.com/JeremySkinner/FluentValidation/issues/216","id":135449499,"number":216,"title":"  Understanding dependent rules - no error message from dependant rules","user":{"login":"Lechus","id":1788699,"avatar_url":"https://avatars.githubusercontent.com/u/1788699?v=3","gravatar_id":"","url":"https://api.github.com/users/Lechus","html_url":"https://github.com/Lechus","followers_url":"https://api.github.com/users/Lechus/followers","following_url":"https://api.github.com/users/Lechus/following{/other_user}","gists_url":"https://api.github.com/users/Lechus/gists{/gist_id}","starred_url":"https://api.github.com/users/Lechus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lechus/subscriptions","organizations_url":"https://api.github.com/users/Lechus/orgs","repos_url":"https://api.github.com/users/Lechus/repos","events_url":"https://api.github.com/users/Lechus/events{/privacy}","received_events_url":"https://api.github.com/users/Lechus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JeremySkinner/FluentValidation/labels/Type:%20Question","name":"Type: Question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-22T15:21:11Z","updated_at":"2016-04-13T13:05:27Z","closed_at":"2016-04-13T13:05:27Z","body":"Hi,\r\n\r\nI have a collection that needs to include at least two elements with defined enum values. If I test with empty item FV does not return failure messages from DependentRules, just from custom valdiator:\r\n\r\n\r\n`RuleFor(quote => quote.Fees)`\r\n\r\n                .NotEmpty()\r\n                .DependentRules(quote =>\r\n                {\r\n                    quote.RuleFor(x => x.Fees)\r\n                        .Must(fees => fees.Any(x => x.FeeType == EnumFeeType.A))\r\n                        .WithMessage(\"Fees must contains A fee.\")\r\n                        .Must(fees => fees.Any(x => x.FeeType == EnumFeeType.B))\r\n                        .WithMessage(\"Fees must contains B fee.\");\r\n                })\r\n                .SetCollectionValidator(new FeeValidator());\r\n\r\nFeeValidator: checks IsInEnum FeeType and FeeAmount is >0.\r\n\r\nFor:\r\nnull - OK,\r\nempty - OK \r\nIf there are valid (by FeeValdiator) elements it returns excepted failures, that there are not FeeType=A and FeeType=B, \r\n\r\nbut if I put there invalid FEE element, like not specified FeeAmount I do not get failures from dependentRules just from FeeValidator.\r\n\r\nIt this correct? DependentRules are not dependent on just pre-rules, but for all rules?\r\n\r\nCheers"}}