New: Updated FluentValidation to 8.4.0

Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
Qstick
2019-09-11 21:26:54 -04:00
parent 7bd1dea492
commit ee0220dfa8
11 changed files with 19 additions and 46 deletions
@@ -36,14 +36,12 @@ namespace NzbDrone.Core.Indexers.Newznab
public NewznabSettingsValidator()
{
Custom(newznab =>
RuleFor(c => c).Custom((c, context) =>
{
if (newznab.Categories.Empty())
if (c.Categories.Empty())
{
return new ValidationFailure("", "'Categories' must be provided");
context.AddFailure("'Categories' must be provided");
}
return null;
});
RuleFor(c => c.BaseUrl).ValidRootUrl();