diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_validation.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_validation.tsx
index 109e62b0e0de4..1e81e9fc6bbc3 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_validation.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_validation.tsx
@@ -38,20 +38,20 @@ export const agentPolicyFormValidation = (
errors.namespace = [namespaceValidation.error];
}
- if (agentPolicy.unenroll_timeout !== undefined && agentPolicy.unenroll_timeout <= 0) {
+ if (agentPolicy.unenroll_timeout && agentPolicy.unenroll_timeout < 0) {
errors.unenroll_timeout = [
,
];
}
- if (agentPolicy.inactivity_timeout !== undefined && agentPolicy.inactivity_timeout <= 0) {
+ if (agentPolicy.inactivity_timeout && agentPolicy.inactivity_timeout < 0) {
errors.inactivity_timeout = [
,
];
}