BuilderIO / BuilderIO/builder

Required rule doesn't work on field if it's nested in object

Open
#3,049 1 comment 0 reactions 0 assignees View on GitHub
Stale
Dominant language
TypeScript
Stars
8.8k
Forks
1.2k
Avg merge
1d 6h
Merged PRs (30d)
17

Description

**Describe the bug**
Required rule doesn't work on the field which is nested inside field of type "object". Builder doesn't show any error message.
This happens only when field is nested inside object. If it's top level field then it works correctly.

**To Reproduce**
Steps to reproduce the behavior:
1. Register custom component with such field definition:
```
inputs: [
{
name: 'someObject',
type: 'object',
subFields: [
{
name: 'someFile',
type: 'file',
required: true,
},
],
},
]
```
2. Put the component in Builder on some page.
3. Check "someFile" field - there is no error message even if there is no file

**Expected behavior**
There should be an error message in the top right corner of Builder editor like "You are missing a required input"

**Screenshots**
Screenshot 2024-03-13 at 16 26 15
Screenshot 2024-03-14 at 10 05 40

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.