Fix hostname/IP validation to prevent whitespace input in the SSL and Create New Service form (closes #114)

This commit is contained in:
Tola Leng
2026-01-24 20:58:33 +07:00
parent 4f367b92da
commit 370f613080
6 changed files with 48 additions and 37 deletions
@@ -88,6 +88,7 @@ export const servicesTranslations: ServicesTranslations = {
serviceNameRequired: "Service name is required",
urlDomainHostRequired: "URL/Domain/Host is required",
enterValidUrlHostnameDomain: "Please enter a valid URL, hostname, or domain",
spacesNotAllowed: "Spaces are not allowed",
// Dashboard
upServices: "UP SERVICES",
@@ -88,6 +88,7 @@ export const servicesTranslations: ServicesTranslations = {
serviceNameRequired: "តម្រូវឱ្យមានឈ្មោះសេវាកម្ម",
urlDomainHostRequired: "តម្រូវឱ្យមាន URL/ដែន/ម៉ាស៊ីន",
enterValidUrlHostnameDomain: "សូមបញ្ចូល URL, ឈ្មោះម៉ាស៊ីន ឬដែនដែលត្រឹមត្រូវ",
spacesNotAllowed: "មិនអនុញ្ញាតឱ្យមានចន្លោះទំនេរទេ",
// Dashboard
upServices: "សេវាកម្មដំណើរការ",
+14 -13
View File
@@ -1,19 +1,19 @@
export interface ServicesTranslations {
serviceStatus: string;
uptime: string;
lastChecked: string;
noServices: string;
currentlyMonitoring: string;
retry: string;
overview: string;
newService: string;
rowsPerPage: string;
search: string;
allTypes: string;
createNewService: string;
createNewServiceDesc: string;
serviceStatus: string;
uptime: string;
lastChecked: string;
noServices: string;
currentlyMonitoring: string;
retry: string;
overview: string;
newService: string;
rowsPerPage: string;
search: string;
allTypes: string;
createNewService: string;
createNewServiceDesc: string;
// ServiceBasicFields.tsx
serviceName: string;
@@ -87,6 +87,7 @@ export interface ServicesTranslations {
serviceNameRequired: string;
urlDomainHostRequired: string;
enterValidUrlHostnameDomain: string;
spacesNotAllowed: string;
// Dashboard
upServices: string;
@@ -112,4 +112,5 @@ export interface SSLTranslations {
lastNotification: string;
collectionId: string;
noCertificatesFound: string;
spacesNotAllowed: string;
}