We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ea5fc2 commit 44ac02fCopy full SHA for 44ac02f
detection_rules/rule.py
@@ -708,6 +708,12 @@ def get_required_fields(self, index: str) -> List[dict]:
708
if validator is not None:
709
return validator.get_required_fields(index or [])
710
711
+ @validates_schema
712
+ def validates_index_and_data_view_id(self, data, **kwargs):
713
+ """Validate that either index or data_view_id is set, but not both."""
714
+ if data.get('index') and data.get('data_view_id'):
715
+ raise ValidationError("Only one of index or data_view_id should be set.")
716
+
717
@validates_schema
718
def validates_query_data(self, data, **kwargs):
719
"""Custom validation for query rule type and subclasses."""
0 commit comments