@imbricate/core 3.15.4 → 3.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/document/validate.js +6 -21
- package/package.json +1 -1
package/document/validate.js
CHANGED
|
@@ -60,35 +60,20 @@ const validateImbricateProperties = (properties, schema, allowExtraProperties =
|
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
case property_1.IMBRICATE_PROPERTY_TYPE.MARKDOWN: {
|
|
63
|
-
if (
|
|
64
|
-
return `Property ${key} value must be
|
|
65
|
-
}
|
|
66
|
-
for (const markdown of value.value) {
|
|
67
|
-
if (typeof markdown !== "string") {
|
|
68
|
-
return `Property ${key} markdown must be a string`;
|
|
69
|
-
}
|
|
63
|
+
if (typeof value.value !== "string") {
|
|
64
|
+
return `Property ${key} value must be a string`;
|
|
70
65
|
}
|
|
71
66
|
break;
|
|
72
67
|
}
|
|
73
68
|
case property_1.IMBRICATE_PROPERTY_TYPE.JSON: {
|
|
74
|
-
if (
|
|
75
|
-
return `Property ${key} value must be
|
|
76
|
-
}
|
|
77
|
-
for (const json of value.value) {
|
|
78
|
-
if (typeof json !== "string") {
|
|
79
|
-
return `Property ${key} json must be a string`;
|
|
80
|
-
}
|
|
69
|
+
if (typeof value.value !== "string") {
|
|
70
|
+
return `Property ${key} value must be a string`;
|
|
81
71
|
}
|
|
82
72
|
break;
|
|
83
73
|
}
|
|
84
74
|
case property_1.IMBRICATE_PROPERTY_TYPE.IMBRISCRIPT: {
|
|
85
|
-
if (
|
|
86
|
-
return `Property ${key} value must be
|
|
87
|
-
}
|
|
88
|
-
for (const imbriscript of value.value) {
|
|
89
|
-
if (typeof imbriscript !== "string") {
|
|
90
|
-
return `Property ${key} imbriscript must be a string`;
|
|
91
|
-
}
|
|
75
|
+
if (typeof value.value !== "string") {
|
|
76
|
+
return `Property ${key} value must be a string`;
|
|
92
77
|
}
|
|
93
78
|
break;
|
|
94
79
|
}
|