// SPDX-FileCopyrightText: 2024 Mehdi Benadel // // SPDX-License-Identifier: AGPL-3.0-only export enum ValidationErrorType { Missing, WrongType, WrongFormat, NotInRange, Duplicate, TooLong } export class ValidationError extends Error { properties: {[key: string]: ValidationErrorType[] } = {} constructor (name: string, message: string | undefined, properties: ValidationError['properties']) { super(message) this.name = name this.properties = properties } }