1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-02-27 08:23:44 +00:00
Sonarr/NzbDrone.Core/Indexers/Omgwtfnzbs/OmgwtfnzbsSettings.cs
2013-08-22 01:08:43 -07:00

28 lines
696 B
C#

using System;
using FluentValidation;
using FluentValidation.Results;
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Indexers.Omgwtfnzbs
{
public class OmgwtfnzbsSetting : AbstractValidator<OmgwtfnzbsSetting>, IIndexerSetting
{
public OmgwtfnzbsSetting()
{
RuleFor(c => c.Username).NotEmpty();
RuleFor(c => c.ApiKey).NotEmpty();
}
[FieldDefinition(0, Label = "Username")]
public String Username { get; set; }
[FieldDefinition(1, Label = "API Key")]
public String ApiKey { get; set; }
public ValidationResult Validate()
{
return Validate(this);
}
}
}