@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/esm/index.js
CHANGED
|
@@ -257,13 +257,16 @@ class EntitySerializer {
|
|
|
257
257
|
for (const validator of column.validators ?? []) {
|
|
258
258
|
const result = validator.fn(entity);
|
|
259
259
|
if (!result.isValid) {
|
|
260
|
-
validationErrors
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
260
|
+
for (const error of result.validationErrors) {
|
|
261
|
+
validationErrors.push({
|
|
262
|
+
errorCode: error.errorCode,
|
|
263
|
+
column: {
|
|
264
|
+
name: column.name,
|
|
265
|
+
key: column.key,
|
|
266
|
+
value: error.value,
|
|
267
|
+
},
|
|
268
|
+
});
|
|
269
|
+
}
|
|
267
270
|
}
|
|
268
271
|
}
|
|
269
272
|
}
|