1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/src/NzbDrone.Core/Validation/FolderValidator.cs

19 lines
476 B
C#
Raw Normal View History

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();
}
}
}