@onehat/data 1.22.47 → 1.22.48
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/package.json +1 -1
- package/src/Schema/Schema.js +4 -0
package/package.json
CHANGED
package/src/Schema/Schema.js
CHANGED
|
@@ -304,6 +304,10 @@ export default class Schema extends EventEmitter {
|
|
|
304
304
|
return propertyDefinition.name === propertyName;
|
|
305
305
|
}));
|
|
306
306
|
|
|
307
|
+
if (!found) {
|
|
308
|
+
throw Error('Property "' + propertyName + '" not found in schema "' + this.name + '".');
|
|
309
|
+
}
|
|
310
|
+
|
|
307
311
|
if (this.model?.validator?.fields && this.model.validator.fields[propertyName]) {
|
|
308
312
|
found.validator = this.model?.validator?.fields[propertyName];
|
|
309
313
|
}
|