How to extend Fileupload dialog with required description

Vote:
 

Hi!

I have a case where my customer needs to have required description on each image uploaded to episerver. We have extended ImageData and added a description field on this where the editor add the description if they remember. But how can we set the Description field required so that editors needs to add the description for each file. I think to extend the fileupload dialog will be the cleanes solution, but have not figured out how. 

#253603
Apr 20, 2021 0:42
Vote:
 

I think the easiest solution is to use IValidate and validate pages/blocks that may use images.

You can add the validation logic to your base page, and simply check ContentReference/Xhtmlstring etc for images without description. If they exist, throw a validation error. In the error message, reference the property name and image id - so it's easier for the editors to fix.

This way, you can make the new policy effective for your existing images too.

#253608
Edited, Apr 20, 2021 7:34
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.