admin/internet: validator for domain/host field
Massimo Melina committed
Mar 23, 2025 at 15:48 UTC
581f3854cbc356b47f988ad270f6b24d08a0dc5c
1 file changed
+2
-1
admin/src/InternetPage.ts
+2
-1
@@ -282,7 +282,8 @@ export default function InternetPage({ setTitleSide }: PageProps) {
282
helperText: "You can decide different home-folders (in the VFS) for different domains, a bit like virtual hosts. If none is matched, the default home will be used.",
283
comp: ArrayField,
284
fields: [
285
- { k: 'host', label: "Domain/Host", helperText: "Wildcards supported: *.domain.com|other.com" },
285
+ { k: 'host', label: "Domain/Host", helperText: "Wildcards supported: *.domain.com|other.com",
286
+ getError: (v?: string) => v?.includes('/') && "No URLs or paths here!" },
287
{ k: 'root', label: "Home/Root", comp: VfsPathField, files: false, placeholder: "default", helperText: "Root path in VFS",
288
$column: { renderCell({ value }: any) { return value || h('i', {}, 'default') } } },
289
],