diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx index df701f4b196f2..e5574ea22eb1b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx @@ -77,12 +77,11 @@ export const schema: FormSchema = { ...args: Parameters ): ReturnType> | undefined => { const [{ value, path, formData }] = args; - const { query, filters, edited } = value as DefineStepRule['queryBar']; + const { query, filters } = value as DefineStepRule['queryBar']; const needsValidation = !isMlRule(formData.ruleType); - if (!needsValidation || edited === false) { + if (!needsValidation) { return; } - return isEmpty(query.query as string) && isEmpty(filters) ? { code: 'ERR_FIELD_MISSING', @@ -97,9 +96,9 @@ export const schema: FormSchema = { ...args: Parameters ): ReturnType> | undefined => { const [{ value, path, formData }] = args; - const { query, edited } = value as DefineStepRule['queryBar']; + const { query } = value as DefineStepRule['queryBar']; const needsValidation = !isMlRule(formData.ruleType); - if (!needsValidation || edited === false) { + if (!needsValidation) { return; }