eclipsesource / eclipsesource/jsonforms

Required object/array are not outlined in red when missing

Open
#2,530 2 comments 0 reactions 0 assignees View on GitHub
angular material
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### Describe the bug

When using Angular, nested object/array validation is not reflected on the UI.

### Expected behavior

Show the red outline to indicate that the value are not valid.

### Steps to reproduce the issue

1. Clone the [test project for angular](https://github.com/eclipsesource/jsonforms-angular-seed)
2. Change `src/assets/schema.json` to
```json
{
"type": "object",
"properties": {
"innerArray": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [ "name" ],
"properties": {
"name": {
"type": "string"
}
}
}
},
"innerObject": {
"type": "object",
"required": [ "name" ],
"properties": {
"name": {
"type": "string"
}
}
},
"primitiveProperty": {
"type": "string"
}
},
"required": [ "innerObject", "innerArray", "primitiveProperty" ]
}
```
3. Change `src/assets/uischema.json` to
```json
{
"type": "VerticalLayout",
"elements": [
{
"type": "Group",
"label": "InnerObject",
"elements": [
{
"type": "Control",
"scope": "#/properties/innerObject/properties/name"
}
]
},
{
"type": "Control",
"scope": "#/properties/innerArray"
},
{
"type": "Control",
"scope": "#/properties/primitiveProperty"
}
]
}
```
4. Run the app

### Screenshots

Image

It's not obvious for the user that the object/array are required

### Which Version of JSON Forms are you using?

v3.7.0

### Package

Angular Material Renderers

### Additional context

_No response_

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.