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.
Facing the same issue . Required is not working while using showIf
{
name: ‘showProduct’,
type: ‘boolean’,
defaultValue: false,
},
{
name: ‘productId’,
type: ‘string’,
showIf: (options) => options.get(‘showProduct’) === true,
required: true,
}
Hi Builder Forum! Where are you in solving this issue? We have the same one, and would really need to be able to mark AND get error handling on every field that is required, even if that field is a subfield to a object, list etc.