Don't validate parent page before some image metadata are not set?

Hi,

I have a parent page with an upload field limited to one image.

I use an image file template to add metadata field like licences, etc. So after upload user could click on the image and complete the metadata.

Because we cannot/don’t want image/picture without a clear license on our site, i search a way to block the save of the parent page until the license metadata is not set.

Do you have an idea/example to do that, i search on the forum without success ?

Thanks !

You could use a page.update:before hook that check your file metadata and throws an error when not set.