# Is it possible to show validation error when list subfield marked as required is empty?

**URL:** <https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176>\
**Category:** Technical Questions\
**Created:** [March 15, 2024, 11:03am UTC](https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176 "2024-03-15T11:03:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grimlaf](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@Grimlaf](https://forum.builder.io/u/Grimlaf)\
**Post date:** [March 15, 2024, 11:03am UTC](https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176/1 "2024-03-15T11:03:35Z")

</div>

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:

```auto
{
	name: 'listtest',
	type: 'list',
	subFields: [
		{
			name: 'test',
			type: 'text',
			required: true,
		},
	],
}

```

Screenshots:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/a/af946de5bac16219f5290f218f510a36502c5649.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/b/b0aa5fc129f275cb14e0cdaf7f05e6264d1e3505.png)

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [March 18, 2024, 12:17pm UTC](https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176/2 "2024-03-18T12:17:56Z")

</div>

Hello @Grimlaf,

Welcome to the [builder.io](http://builder.io) forum post.

I am happy to confirm that I was able to reproduce the issue you are experiencing thanks to the details and steps you have provided.

I will now discuss the issue internally to determine the next steps. Once I have further updates, I will get back to you.

Thanks,

---

<div class="post-metadata">

**Author:** ![Anand](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Anand](https://forum.builder.io/u/Anand)\
**Post date:** [July 9, 2025, 11:36am UTC](https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176/3 "2025-07-09T11:36:00Z")

</div>

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,  
}

---

<div class="post-metadata">

**Author:** ![matrod](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@matrod](https://forum.builder.io/u/matrod)\
**Post date:** [February 2, 2026, 10:33am UTC](https://forum.builder.io/t/is-it-possible-to-show-validation-error-when-list-subfield-marked-as-required-is-empty/5176/4 "2026-02-02T10:33:06Z")

</div>

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.
