fix(striker-ui): mark necessary fields as required in general, network init forms

main
Tsu-ba-me 9 months ago
parent a6e29c2b0c
commit c22bc3ed29
  1. 7
      striker-ui/components/GeneralInitForm.tsx
  2. 6
      striker-ui/components/NetworkInitForm.tsx

@ -203,6 +203,7 @@ const GeneralInitForm = forwardRef<
setAdminPasswordInputMessage(undefined); setAdminPasswordInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -234,6 +235,7 @@ const GeneralInitForm = forwardRef<
setConfirmAdminPasswordInputMessage(undefined); setConfirmAdminPasswordInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -255,6 +257,7 @@ const GeneralInitForm = forwardRef<
setDomainNameInputMessage(undefined); setDomainNameInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -282,6 +285,7 @@ const GeneralInitForm = forwardRef<
setHostNameInputMessage(undefined); setHostNameInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -309,6 +313,7 @@ const GeneralInitForm = forwardRef<
setHostNumberInputMessage(undefined); setHostNumberInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -326,6 +331,7 @@ const GeneralInitForm = forwardRef<
getValue: () => getValue: () =>
organizationNameInputRef.current.getValue?.call(null), organizationNameInputRef.current.getValue?.call(null),
}, },
isRequired: true,
tests: [{ test: testNotBlank }], tests: [{ test: testNotBlank }],
}, },
[IT_IDS.organizationPrefix]: { [IT_IDS.organizationPrefix]: {
@ -338,6 +344,7 @@ const GeneralInitForm = forwardRef<
setOrganizationPrefixInputMessage(undefined); setOrganizationPrefixInputMessage(undefined);
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: ({ max, min }) => { onFailure: ({ max, min }) => {

@ -888,6 +888,7 @@ const NetworkInitForm = forwardRef<
setDnsInputMessage(); setDnsInputMessage();
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -908,6 +909,7 @@ const NetworkInitForm = forwardRef<
setGatewayInputMessage(); setGatewayInputMessage();
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1020,6 +1022,7 @@ const NetworkInitForm = forwardRef<
setNetworkIfacesInputMessage(); setNetworkIfacesInputMessage();
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1048,6 +1051,7 @@ const NetworkInitForm = forwardRef<
setNetworkIPAddressInputMessage(); setNetworkIPAddressInputMessage();
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {
@ -1068,6 +1072,7 @@ const NetworkInitForm = forwardRef<
}; };
tests[IT_IDS.networkName(inputTestPrefix)] = { tests[IT_IDS.networkName(inputTestPrefix)] = {
defaults: { value: name }, defaults: { value: name },
isRequired: true,
tests: [{ test: testNotBlank }], tests: [{ test: testNotBlank }],
}; };
tests[inputTestIDSubnetMask] = { tests[inputTestIDSubnetMask] = {
@ -1077,6 +1082,7 @@ const NetworkInitForm = forwardRef<
setNetworkSubnetMaskInputMessage(); setNetworkSubnetMaskInputMessage();
}, },
}, },
isRequired: true,
tests: [ tests: [
{ {
onFailure: () => { onFailure: () => {

Loading…
Cancel
Save