mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-27 22:57:09 -04:00
Validation, settings UI cleanup and different settings models, oh my
New: Download client UI matches other settings Fixed: Prevent drone factory folder from being set to invalid paths/root path for series Fixed: Switching pages in settings will not hide changes Fixed: Test download clients Fixed: Settings are validated before saving
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using FluentValidation.Validators;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.Core.Validation
|
||||
{
|
||||
public class FolderValidator : PropertyValidator
|
||||
{
|
||||
public FolderValidator()
|
||||
: base("Invalid Path")
|
||||
{
|
||||
}
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
if (context.PropertyValue == null) return false;
|
||||
return context.PropertyValue.ToString().IsPathValid();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user