Fixed hostname validation message for ERI data sources (#265)

This commit is contained in:
Thorsten Sommer 2025-01-21 13:49:44 +01:00 committed by GitHub
parent 14caf550ec
commit ed14525390
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ public sealed class DataSourceValidation
public string? ValidatingHostname(string hostname) public string? ValidatingHostname(string hostname)
{ {
if(string.IsNullOrWhiteSpace(hostname)) if(string.IsNullOrWhiteSpace(hostname))
return "Please enter a hostname, e.g., http://localhost:1234"; return "Please enter a hostname, e.g., http://localhost";
if(!hostname.StartsWith("http://", StringComparison.InvariantCultureIgnoreCase) && !hostname.StartsWith("https://", StringComparison.InvariantCultureIgnoreCase)) if(!hostname.StartsWith("http://", StringComparison.InvariantCultureIgnoreCase) && !hostname.StartsWith("https://", StringComparison.InvariantCultureIgnoreCase))
return "The hostname must start with either http:// or https://"; return "The hostname must start with either http:// or https://";