Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mimoid-prog opened this issue Mar 14, 2024 · 0 comments
Open

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

mimoid-prog opened this issue Mar 14, 2024 · 0 comments

Comments

@mimoid-prog
Copy link

mimoid-prog commented Mar 14, 2024

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,
				},
			],
		},
	]
  1. Put the component in Builder on some page.
  2. 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

@mimoid-prog mimoid-prog changed the title Required rule doesn't work on field of type "file" if it's nested in object Required rule doesn't work on field if it's nested in object May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant