Add TODO markers for error aggregration

This commit is contained in:
Sven Slootweg 2020-06-14 01:04:29 +02:00
parent c12691fe62
commit 8ed6ad0abe

View file

@ -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) => {