@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.
@@ -12,6 +12,7 @@ export type ImportEntryValidationError = {
12
12
  column: {
13
13
  name: string;
14
14
  key: string;
15
+ value?: any;
15
16
  };
16
17
  };
17
18
  export type ImportEntryValidationResult = {
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.push({
261
- errorCode: validator.key,
262
- column: {
263
- name: column.name,
264
- key: column.key,
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
  }