@sn1006/common 1.0.16 → 1.0.17

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.
@@ -9,7 +9,7 @@ declare class CustomValidationError extends NormalizedError {
9
9
  constructor(errors: NonSerializedValidationError[]);
10
10
  serializeErrors(): {
11
11
  message: string;
12
- field: string;
12
+ field: string | undefined;
13
13
  }[];
14
14
  }
15
15
  export default CustomValidationError;
@@ -10,7 +10,7 @@ class CustomValidationError extends normalized_error_1.NormalizedError {
10
10
  }
11
11
  serializeErrors() {
12
12
  return this.errors.map(err => {
13
- return { message: err.msg, field: err.path };
13
+ return { message: err.msg, field: err.path.split(".").pop() };
14
14
  });
15
15
  }
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sn1006/common",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",