I have a property editor that has a title field on it that is sometimes required and sometimes it isn’t. Visually, it works perfectly by setting the required property on the uui-input:
This title is not required when I can get a title from the oEmbed data, so it’s fine:
But when there is no oEmbed data or the platform does not support oEmbed, I want the editor to supply a title to the video:
As you can see, the field has the correct validation and has the red outline because of the required property on the uui-textbox. However, this is purely cosmetic and the backoffice really does not care. You can just happily save and publish the page:
So to be clear, this is something different than making the entire property editor required or not. I know how to do that and works on the value property being set or not. This is more or less custom validation logic. It’s clear that marking a uui-input as required does not do anything. But how do I handle this and prevent the page being published?