Radarr/src/NzbDrone.Api/Config/IndexerConfigModule.cs

23 lines
673 B
C#
Raw Normal View History

using FluentValidation;
2015-12-20 02:02:38 +00:00
using NzbDrone.Api.Validation;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Api.Config
{
public class IndexerConfigModule : NzbDroneConfigModule<IndexerConfigResource>
{
public IndexerConfigModule(IConfigService configService)
: base(configService)
{
SharedValidator.RuleFor(c => c.MinimumAge)
2014-12-16 00:31:26 +00:00
.GreaterThanOrEqualTo(0);
SharedValidator.RuleFor(c => c.Retention)
.GreaterThanOrEqualTo(0);
SharedValidator.RuleFor(c => c.RssSyncInterval)
2015-12-20 02:02:38 +00:00
.IsValidRssSyncInterval();
}
}
}