1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00
Files
Radarr/src/Radarr.Http/Validation/NetImportSyncIntervalValidator.cs
T
2020-11-28 16:34:07 -05:00

30 lines
639 B
C#

using FluentValidation.Validators;
namespace Radarr.Http.Validation
{
public class ImportListSyncIntervalValidator : PropertyValidator
{
public ImportListSyncIntervalValidator()
: base("Must be greater than 6 hours")
{
}
protected override bool IsValid(PropertyValidatorContext context)
{
if (context.PropertyValue == null)
{
return true;
}
var value = (int)context.PropertyValue;
if (value >= 6)
{
return true;
}
return false;
}
}
}