mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-18 23:48:35 +02:00
77b83b521e
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
19 lines
476 B
C#
19 lines
476 B
C#
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();
|
|
}
|
|
}
|
|
} |