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:
@@ -14,7 +14,7 @@ namespace NzbDrone.Core.Validation
|
||||
|
||||
public class UrlValidator : PropertyValidator
|
||||
{
|
||||
protected override string GetDefaultMessageTemplate() => "Invalid Url";
|
||||
protected override string GetDefaultMessageTemplate() => "Invalid Url: '{url}'";
|
||||
|
||||
protected override bool IsValid(PropertyValidatorContext context)
|
||||
{
|
||||
@@ -23,6 +23,8 @@ namespace NzbDrone.Core.Validation
|
||||
return false;
|
||||
}
|
||||
|
||||
context.MessageFormatter.AppendArgument("url", context.PropertyValue.ToString());
|
||||
|
||||
return context.PropertyValue.ToString().IsValidUrl();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user