From 8ed6ad0abe0f5f53fde40f11efeac189b6a1ccb8 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 14 Jun 2020 01:04:29 +0200 Subject: [PATCH] Add TODO markers for error aggregration --- src/aggregrate-errors.js | 3 +++ 1 file changed, 3 insertions(+) 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) => {