diff --git a/frontend/components/forms/admin/AppConfigForm/AppConfigForm.tsx b/frontend/components/forms/admin/AppConfigForm/AppConfigForm.tsx index d6d914f838..e0dceb01ba 100644 --- a/frontend/components/forms/admin/AppConfigForm/AppConfigForm.tsx +++ b/frontend/components/forms/admin/AppConfigForm/AppConfigForm.tsx @@ -219,7 +219,7 @@ const AppConfigFormFunctional = ({ } if (enableHostExpiry) { - if (!hostExpiryWindow) { + if (!hostExpiryWindow || hostExpiryWindow <= 0) { errors.host_expiry_window = "Host expiry window must be a positive number"; } @@ -235,7 +235,7 @@ const AppConfigFormFunctional = ({ setFormErrors(errors); }; - // Validates forms when certain checkboxes and dropdowns are selected + // Validates forms when certain information is changed useEffect(() => { validateForm(); }, [ @@ -245,6 +245,7 @@ const AppConfigFormFunctional = ({ enableHostStatusWebhook, enableHostExpiry, agentOptions, + hostExpiryWindow, ]); // TOGGLE MODALS @@ -832,86 +833,73 @@ const AppConfigFormFunctional = ({
Add a policy to turn on automations.
)} -