Skip to content

Commit 993018a

Browse files
authored
Fix validation of default value for numeric types, it can contain any expression (#59)
1 parent 32eb6f6 commit 993018a

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

properties_pane/samples.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[
2+
{
3+
"validateAs": "number",
4+
"constraintsFromField": {
5+
"min": "minimum",
6+
"exclusiveMin": "exclusiveMinimum",
7+
"max": "maximum",
8+
"exclusiveMax": "exclusiveMaximum",
9+
"multipleOf": "multipleOf",
10+
"divisibleBy": "divisibleBy"
11+
},
12+
"dependency": {
13+
"type": "and",
14+
"values": [
15+
{ "key": "childType", "value": "numeric" },
16+
{ "key": "default", "valueType": "number" }
17+
]
18+
}
19+
},
20+
{
21+
"validateAs": "string",
22+
"dependency": {
23+
"type": "and",
24+
"values": [
25+
{ "key": "childType", "value": "numeric" },
26+
{ "key": "default", "valueType": "string" }
27+
]
28+
}
29+
}
30+
]

0 commit comments

Comments
 (0)