mariohmol / ang-jsoneditor

Angular Jsoneditor that works with angular 4 to angular 15
https://stackblitz.com/edit/angular-json-editor
MIT License
156 stars 89 forks source link

How to validate, array only allow one value which is present in schema. #81

Closed PParshive closed 3 years ago

PParshive commented 3 years ago

Hi, From given schema : "properties": { "resultType": { "$id": "#root/ruleProperties/resultType", "title": "Resulttype", "type": "array", "contains": {"type": "string"}, "default": [], "items":{ "$id": "#root/ruleProperties/resultType/items", "title": "Items", "type": "string", "default": "", "enum":["expression","rowcount"], "examples": [ "expression" ] } } Array : "resultType":["expression"] resultType array should allow either "expression" or "rowcount", can you guys tell me how to achieve this feature?.

Thanks

mariohmol commented 3 years ago

uhmm I dont know.. as this is a wrapper for json-editor, I would say to look at that repo https://github.com/josdejong/jsoneditor