diff --git a/src/aggregrate-errors.js b/src/aggregrate-errors.js index 899d27c..f24caf6 100644 --- a/src/aggregrate-errors.js +++ b/src/aggregrate-errors.js @@ -4,6 +4,9 @@ const matchVirtualProperty = require("@validatem/match-virtual-property"); const AggregrateValidationError = require("./aggregrate-validation-error"); +// TODO: Omit the "At (root)" for path-less errors, to avoid confusion when singular values are being compared? +// TODO: Move out the path generating logic into a separate module, to better support custom error formatting code + module.exports = function aggregrateAndThrowErrors(errors) { let rephrasedErrors = errors.map((error) => { let stringifiedPathSegments = error.path.map((segment) => {