Skip to content

FR: set showConstraintMessages to true when stringifing validation errors #92

@mjpieters

Description

@mjpieters

Minor nit: Please set the showConstraintMessages parameter to ValidationError.toString() to true when validating headers, here:

if (errors.length > 0) {
throw new Error(errors.map((err) => err.toString()).join('\n'));
}

If you use err.toString(undefined, undefined, undefined, true) there then the validator message is shown rather than the name, which is a bit more informative. Compare

- property updateURL has failed the following constraints: isUrl 

with

- property updateURL has failed the following constraints: updateURL must be a URL address

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions