mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
New: Updated FluentValidation to 8.4.0
Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user