mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-18 23:48:35 +02:00
19 lines
487 B
C#
19 lines
487 B
C#
using FluentValidation.Validators;
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
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();
|
|
}
|
|
}
|
|
} |