Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

import _ from 'lodash';
import { OPERATORS_MAP, Expressions } from './constants';
import { TRIGGER_COMPARISON_OPERATORS } from '../../../../../CreateTrigger/containers/DefineBucketLevelTrigger/DefineBucketLevelTrigger';
import {
TRIGGER_COMPARISON_OPERATORS,
TRIGGER_OPERATORS_MAP,
} from '../../../../../CreateTrigger/containers/DefineBucketLevelTrigger/DefineBucketLevelTrigger';
import { DATA_TYPES } from '../../../../../../utils/constants';
import { FORMIK_INITIAL_WHERE_EXPRESSION_VALUES } from '../../../../containers/CreateMonitor/utils/constants';

Expand Down Expand Up @@ -98,6 +101,10 @@ export const validateWhereFilter = (filter = FORMIK_INITIAL_WHERE_EXPRESSION_VAL
// These operators don't store a query value in the FORMIK_INITIAL_WHERE_EXPRESSION_VALUES.
// No further validation needed.
break;
case TRIGGER_OPERATORS_MAP.INCLUDE:
case TRIGGER_OPERATORS_MAP.EXCLUDE:
filterIsValid = filterIsValid && !_.isEmpty(filter.fieldValue?.toString());
break;
default:
console.log('Unknown query operator detected:', fieldOperator);
filterIsValid = false;
Expand Down
Loading