diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts index e204d86b51511..bf75b05f41b8d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.ts @@ -22,7 +22,11 @@ export const hasInvalidButRequiredVar = ( registryVar.required && (!packagePolicyVars || !packagePolicyVars[registryVar.name] || - validatePackagePolicyConfig(packagePolicyVars[registryVar.name], registryVar)?.length) + validatePackagePolicyConfig( + packagePolicyVars[registryVar.name], + registryVar, + registryVar.name + )?.length) ) ) );