mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-28 23:07:13 -04:00
New: Improve validation messages
(cherry picked from commit a117001de673e80abd90d54a34a7c86292b3a649)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace NzbDrone.Core.Validation
|
||||
{
|
||||
public class FolderValidator : PropertyValidator
|
||||
{
|
||||
protected override string GetDefaultMessageTemplate() => "Invalid Path";
|
||||
protected override string GetDefaultMessageTemplate() => "Invalid Path: '{path}'";
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
@@ -15,6 +15,8 @@ namespace NzbDrone.Core.Validation
|
||||
return false;
|
||||
}
|
||||
|
||||
context.MessageFormatter.AppendArgument("path", context.PropertyValue.ToString());
|
||||
|
||||
return context.PropertyValue.ToString().IsPathValid(PathValidationType.CurrentOs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user