Disallow domain creation if the domain name is invalid
This commit is contained in:
parent
ce91b49a73
commit
4c4dc593cf
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@
|
|||
import { addDomain } from "$lib/api/domains";
|
||||
import { createDomain, listImportableDomains } from "$lib/api/provider";
|
||||
import DomainWithProvider from "$lib/components/domains/DomainWithProvider.svelte";
|
||||
import { fqdn, fqdnCompare } from "$lib/dns";
|
||||
import { fqdn, fqdnCompare, validateDomain } from "$lib/dns";
|
||||
import type { Domain } from "$lib/model/domain";
|
||||
import type { Provider } from "$lib/model/provider";
|
||||
import { filteredName } from '$lib/stores/home';
|
||||
|
@ -266,7 +266,7 @@
|
|||
class="ml-1"
|
||||
color="warning"
|
||||
size="sm"
|
||||
disabled={createDomainInProgress}
|
||||
disabled={createDomainInProgress || !validateDomain($filteredName)}
|
||||
on:click={createDomainOnProvider}
|
||||
>
|
||||
{#if createDomainInProgress}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue