So, I have a schema and a data that fails schema validation (null instead of string). I know this because I’m running the ajv (created by createAjv) against the schema and data.
However, the Control is not receiving the error, just errors="". I’m stomped. Any ideas?
I’ll add that the JSON forms context ctx.core.allErrors is []. I’m confused why that’s empty while ajv.validate(schema, data) returns errors. It’s the same Ajv object.
Schema
{
"type": "object",
"properties": {
"786b195d-80e4-4f75-abc0-c88cdda5c4c9": {
"type": "object",
"required": [
"answer"
],
"description": "oh hi, body here pls",
"properties": {
"answer": {
"oneOf": [
{
"const": "ok",
"title": "Accepter"
},
{
"const": "reject",
"title": "Afvis"
},
{
"const": "warning",
"title": "Kommentar"
},
{
"const": "skip",
"title": "Spring over"
}
]
},
"comment": {
"type": "string",
"title": "Kommentar"
}
}
}
}
}
Data
{
"786b195d-80e4-4f75-abc0-c88cdda5c4c9": {
"answer": "ok",
"comment": null
},
"1c5081a3-dc23-4063-8ef3-66ddba6f1959": {
"latitude": 57.0371337,
"longitude": 9.9220669,
"automatic": true
}
}
Control Props
{
"data": {
"answer": "ok",
"comment": null
},
"description": "oh hi, body here pls",
"errors": "",
"label": "Er kunden tilfreds?",
"visible": true,
"enabled": true,
"id": "#/properties/786b195d-80e4-4f75-abc0-c88cdda5c4c96",
"path": "786b195d-80e4-4f75-abc0-c88cdda5c4c9",
"required": false,
...cut...
}
