indexer specific setting validation

This commit is contained in:
kay.one
2013-08-22 01:08:43 -07:00
parent 227e13d858
commit e4fc0c57b3
11 changed files with 93 additions and 26 deletions
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using FluentValidation;
using FluentValidation.Results;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.Indexers.Newznab
{
@@ -8,7 +11,8 @@ namespace NzbDrone.Core.Indexers.Newznab
{
public NewznabSettings()
{
Categories = new [] { 5030, 5040 };
Categories = new[] { 5030, 5040 };
//RuleFor(c => c.Url).ValidRootUrl();
}
[FieldDefinition(0, Label = "URL")]
@@ -26,5 +30,11 @@ namespace NzbDrone.Core.Indexers.Newznab
return !string.IsNullOrWhiteSpace(Url);
}
}
public ValidationResult Validate()
{
return new ValidationResult();
//return Validate(this);
}
}
}