errors not work in anyOf
See original GitHub issueGeneral information
- json-editor version: 1.4 & 2.0 /* all */
Expected behavior
when error occur the editor can show error message.
Actual behavior
It doesn’t show error message in anyOf array.
Steps to reproduce the behavior
Direct link to example: https://is.gd/FM9u4L
labelComponent
doesn’t work.
{
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$",
"minLength": 1,
"maxLength": 50
},
"children": {
"items": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/labelComponent"
}
]
},
"type": "array"
}
},
"type": "object",
"defaultProperties": [
"id",
"children"
],
"definitions": {
"labelComponent": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$",
"minLength": 1,
"maxLength": 50
}
},
"defaultProperties": [
"id"
]
}
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (10 by maintainers)
Top Results From Across the Web
anyOf validation errors only present when other validations fail
I'm expecting an errors object containing only the failed minLength failure as changing name to a string with length > 0 causes the...
Read more >Error Json Validation against JsonSchema and anyOf [closed]
I have a json to validate against jsonSchema, I don't understand why i have an error with the first anyOf, indeed, we can...
Read more >oneOf, anyOf, allOf, not - Swagger
Use the oneOf keyword to ensure the given data is valid against one of the specified schemas. ... The example above shows how...
Read more >How to correct a #DIV/0! error - Microsoft Support
To correct the error, do any of the following: Make sure the divisor in the function or formula isn't zero or a blank...
Read more >Error in Sieve Filter: Function anyof called with too many ...
It was verified that this error is not syntax related; if the problem line from the rule is removed, the next last line...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am probably missing something. If I open the original link https://is.gd/FM9u4L , it still does not work as expected: there is only “high-level” error “Value must validate against at least one of the provided schemas”, but no errors inside anyOf are displayed. The same behavior is in my local installation of this editor (by npm).
How can errors inside anyOf options be displayed?
@pmk65 Yes i think so.