mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
New: Improve validation messages
(cherry picked from commit a117001de673e80abd90d54a34a7c86292b3a649) Fixes #2531
This commit is contained in:
@@ -12,7 +12,7 @@ namespace NzbDrone.Core.Validation.Paths
|
||||
_diskProvider = diskProvider;
|
||||
}
|
||||
|
||||
protected override string GetDefaultMessageTemplate() => "File does not exist";
|
||||
protected override string GetDefaultMessageTemplate() => "File '{file}' does not exist";
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
@@ -21,6 +21,8 @@ namespace NzbDrone.Core.Validation.Paths
|
||||
return false;
|
||||
}
|
||||
|
||||
context.MessageFormatter.AppendArgument("file", context.PropertyValue.ToString());
|
||||
|
||||
return _diskProvider.FileExists(context.PropertyValue.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user