I have a custom component in which i want to have to have an input of type list. When I mark one of list subfields as required and do not provide any data into this field I want visual editor to show error message and prevent user from publishing the page. I thought it would work like any normal input marked as required but I only get an asterisk indicating required field but no error message and can still publish page. Is it expected behavior? Is there any way to prevent user from publishing? OnChange and alerts are not enough for my case.
Here is an example of the input I want to have:
{
name: 'listtest',
type: 'list',
subFields: [
{
name: 'test',
type: 'text',
required: true,
},
],
}
Screenshots: