Fixed: Validation for nested settings not running

Prevents #1243
This commit is contained in:
Qstick
2022-12-18 23:20:46 -06:00
parent dfe132cda2
commit 57dcd861a9
8 changed files with 19 additions and 14 deletions
@@ -1,5 +1,7 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.Indexers
{
@@ -7,6 +9,9 @@ namespace NzbDrone.Core.Indexers
{
public IndexerCommonSettingsValidator()
{
RuleFor(c => c.QueryLimit).GreaterThan(0).When(c => c.QueryLimit.HasValue).WithMessage("Should be greater than zero");
RuleFor(c => c.GrabLimit).GreaterThan(0).When(c => c.GrabLimit.HasValue).WithMessage("Should be greater than zero");
}
}