Fixed: Empty Sabnzbd category is now properly handled. But added UI validation to recommend adding a category.
parent
a8e805fd5d
commit
6803e46782
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
|
||||
namespace NzbDrone.Core.Validation
|
||||
{
|
||||
public class NzbDroneValidationState
|
||||
{
|
||||
public static NzbDroneValidationState Warning = new NzbDroneValidationState { IsWarning = true };
|
||||
|
||||
public bool IsWarning { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
|
||||
namespace NzbDrone.Core.Validation
|
||||
{
|
||||
public abstract class NzbDroneValidator<T> : AbstractValidator<T>
|
||||
{
|
||||
public override ValidationResult Validate(T instance)
|
||||
{
|
||||
return new NzbDroneValidationResult(base.Validate(instance).Errors);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue