@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 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.push({
276
- errorCode: validator.key,
277
- column: {
278
- name: column.name,
279
- key: column.key,
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
  }