josdejong / josdejong/jsoneditor

Expose validation MAX_ERRORS as a configuration parameter

Open
#320 1 comment 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
12.3k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

[`MAX_ERRORS`](https://github.com/josdejong/jsoneditor/blob/master/src/js/textmode.js#L17) controls how many validation errors are shown in text view, and is currently hardcoded to 3.

Suggestion is to make this a configurable parameter, either a fixed number in constructor, or even changeable on an active view.

Reason: Especially in cases of `anyOf`, `oneOf` the first 3 errors do not necessarily pinpoint to the actual validation problem. In such cases, it would be nice to have an option to either default to a bigger number of errors shown, or provide a way to show more errors on demand.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.