From 9dc52d4dfe4927779104c0fd5fe2c056bcc72b56 Mon Sep 17 00:00:00 2001 From: Vitalii Yarmus Date: Fri, 10 Apr 2026 18:46:19 +0300 Subject: [PATCH] Fix validation of default value for numeric types, it can contain any expression --- properties_pane/samples.json | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 properties_pane/samples.json diff --git a/properties_pane/samples.json b/properties_pane/samples.json new file mode 100644 index 0000000..e692bc0 --- /dev/null +++ b/properties_pane/samples.json @@ -0,0 +1,30 @@ +[ + { + "validateAs": "number", + "constraintsFromField": { + "min": "minimum", + "exclusiveMin": "exclusiveMinimum", + "max": "maximum", + "exclusiveMax": "exclusiveMaximum", + "multipleOf": "multipleOf", + "divisibleBy": "divisibleBy" + }, + "dependency": { + "type": "and", + "values": [ + { "key": "childType", "value": "numeric" }, + { "key": "default", "valueType": "number" } + ] + } + }, + { + "validateAs": "string", + "dependency": { + "type": "and", + "values": [ + { "key": "childType", "value": "numeric" }, + { "key": "default", "valueType": "string" } + ] + } + } +]