Skip to content

Commit 50e0364

Browse files
committed
CHANGES:
- Schema validation: Detect wrong instances below DEFAULT
1 parent 0c48c91 commit 50e0364

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/utils/validators.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"check_main_structure",
4848
"is_node",
4949
"is_server",
50+
"is_element",
5051
"validate"
5152
]
5253

@@ -336,6 +337,8 @@ def is_server(value, rule_obj, path):
336337
raise SchemaError(f'Invalid regular expression: "{ex.pattern}"', path=path)
337338

338339
def is_element(value, rule_obj, path):
340+
if path == '/DEFAULT':
341+
return True
339342
node_data = get_node_data()
340343
for instance in value.keys():
341344
if instance in node_data.all_instances:

0 commit comments

Comments
 (0)