I'm creating a component that has a background that can be either an image or a video.
For both the image and the video some additional info should be provided by the author, so i created a show-hide-dropdown in _cq_dialog that toggles fields depending on the chosen value in the dropdown.
A lot of this extra additional info is required (for SEO reasons).
The problem is that when the author chooses for example 'image', there is no possibility to close the dialog, as the 'required video details' are not filled out. So my question is: is there a possibility to make the property 'required' dependent on the chosen value in the dropdown. I add the code, but it is a simplified version of only the relevant tab of the dialog.