Fixed #283: improved JSON schema error message in case of no

additionalProperties
This commit is contained in:
jos 2016-03-24 08:43:26 +01:00
parent aeca44405e
commit f0afcea97d
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,12 @@
https://github.com/josdejong/jsoneditor
## not yet released, version 5.2.1
- Fixed #283: improved JSON schema error message in case of no
additionalProperties.
## 2016-03-20, version 5.2.0
- Implemented method `editor.destroy()` to properly cleanup the editor (#278).

View File

@ -690,6 +690,10 @@ exports.improveSchemaError = function (error) {
}
}
if (error.keyword === 'additionalProperties') {
error.message = 'should NOT have additional property: ' + error.params.additionalProperty;
}
return error;
};