@punks/backend-entity-manager 0.0.379 → 0.0.380
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/dist/cjs/index.js +10 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/serializer.d.ts +1 -0
- package/dist/esm/index.js +10 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/serializer.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -272,13 +272,16 @@ class EntitySerializer {
|
|
|
272
272
|
for (const validator of column.validators ?? []) {
|
|
273
273
|
const result = validator.fn(entity);
|
|
274
274
|
if (!result.isValid) {
|
|
275
|
-
validationErrors
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
275
|
+
for (const error of result.validationErrors) {
|
|
276
|
+
validationErrors.push({
|
|
277
|
+
errorCode: error.errorCode,
|
|
278
|
+
column: {
|
|
279
|
+
name: column.name,
|
|
280
|
+
key: column.key,
|
|
281
|
+
value: error.value,
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
}
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
}
|