mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
added path validation to add series/ recent folders.
This commit is contained in:
parent
bf9946b653
commit
4465d50a31
19 changed files with 146 additions and 88 deletions
18
NzbDrone.Api/Validation/PathValidator.cs
Normal file
18
NzbDrone.Api/Validation/PathValidator.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
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)
|
||||
{
|
||||
return context.PropertyValue.ToString().IsPathValid();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue