From c22bc3ed291f378f6e0fd017512d153c80e3136a Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 21 Mar 2024 18:18:01 -0400 Subject: [PATCH] fix(striker-ui): mark necessary fields as required in general, network init forms --- striker-ui/components/GeneralInitForm.tsx | 7 +++++++ striker-ui/components/NetworkInitForm.tsx | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/striker-ui/components/GeneralInitForm.tsx b/striker-ui/components/GeneralInitForm.tsx index 21fce477..2b1aa3fe 100644 --- a/striker-ui/components/GeneralInitForm.tsx +++ b/striker-ui/components/GeneralInitForm.tsx @@ -203,6 +203,7 @@ const GeneralInitForm = forwardRef< setAdminPasswordInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -234,6 +235,7 @@ const GeneralInitForm = forwardRef< setConfirmAdminPasswordInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -255,6 +257,7 @@ const GeneralInitForm = forwardRef< setDomainNameInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -282,6 +285,7 @@ const GeneralInitForm = forwardRef< setHostNameInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -309,6 +313,7 @@ const GeneralInitForm = forwardRef< setHostNumberInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -326,6 +331,7 @@ const GeneralInitForm = forwardRef< getValue: () => organizationNameInputRef.current.getValue?.call(null), }, + isRequired: true, tests: [{ test: testNotBlank }], }, [IT_IDS.organizationPrefix]: { @@ -338,6 +344,7 @@ const GeneralInitForm = forwardRef< setOrganizationPrefixInputMessage(undefined); }, }, + isRequired: true, tests: [ { onFailure: ({ max, min }) => { diff --git a/striker-ui/components/NetworkInitForm.tsx b/striker-ui/components/NetworkInitForm.tsx index 8db211d8..8d687ae9 100644 --- a/striker-ui/components/NetworkInitForm.tsx +++ b/striker-ui/components/NetworkInitForm.tsx @@ -888,6 +888,7 @@ const NetworkInitForm = forwardRef< setDnsInputMessage(); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -908,6 +909,7 @@ const NetworkInitForm = forwardRef< setGatewayInputMessage(); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -1020,6 +1022,7 @@ const NetworkInitForm = forwardRef< setNetworkIfacesInputMessage(); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -1048,6 +1051,7 @@ const NetworkInitForm = forwardRef< setNetworkIPAddressInputMessage(); }, }, + isRequired: true, tests: [ { onFailure: () => { @@ -1068,6 +1072,7 @@ const NetworkInitForm = forwardRef< }; tests[IT_IDS.networkName(inputTestPrefix)] = { defaults: { value: name }, + isRequired: true, tests: [{ test: testNotBlank }], }; tests[inputTestIDSubnetMask] = { @@ -1077,6 +1082,7 @@ const NetworkInitForm = forwardRef< setNetworkSubnetMaskInputMessage(); }, }, + isRequired: true, tests: [ { onFailure: () => {