mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-28 10:37:41 +00:00
19 lines
No EOL
471 B
C#
19 lines
No EOL
471 B
C#
using FluentValidation.Validators;
|
|
using NzbDrone.Common;
|
|
|
|
namespace NzbDrone.Api.Validation
|
|
{
|
|
public class PathValidator : PropertyValidator
|
|
{
|
|
public PathValidator()
|
|
: base("Invalid Path")
|
|
{
|
|
}
|
|
|
|
protected override bool IsValid(PropertyValidatorContext context)
|
|
{
|
|
if (context.PropertyValue == null) return false;
|
|
return context.PropertyValue.ToString().IsPathValid();
|
|
}
|
|
}
|
|
} |