mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-25 22:01:16 +00:00
finished unit tests and docstrings
This commit is contained in:
@@ -11,9 +11,9 @@ namespace MalwareMultiScan.Api.Attributes
|
||||
/// <inheritdoc />
|
||||
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
|
||||
{
|
||||
if (!Uri.TryCreate((string)value, UriKind.Absolute, out var uri)
|
||||
|| !uri.IsAbsoluteUri
|
||||
|| uri.Scheme.ToLowerInvariant() != "http"
|
||||
if (!Uri.TryCreate((string) value, UriKind.Absolute, out var uri)
|
||||
|| !uri.IsAbsoluteUri
|
||||
|| uri.Scheme.ToLowerInvariant() != "http"
|
||||
&& uri.Scheme.ToLowerInvariant() != "https")
|
||||
return new ValidationResult("Only absolute http(s) URLs are supported");
|
||||
|
||||
|
Reference in New Issue
Block a user