Admin
...
Editorial Admin Set-up
Purple Blocks
Validating Image Blocks and Meta Information
9min
purple hub summary this article describes how to use the image block and meta information validation feature within purple hub the feature ensures that custom fields (such as copyright ownership) are filled in and that images are included in the block this guide will walk you through the requirements, setup and a detailed description of the feature in action at the moment, only custom fields (acfs) and information about whether an image is included in the image blocks can be validated validation of standard fields such as alt tags, title tags, captions etc isn't possible at the time of writing preconditions have an admin role in purple hub have a field group and a custom field defined that applies to images see create custom fields in purple hub docid\ sfolj8v8qcn3m3jibzbuk have the name of your custom field by hand (e g , 'imagecredits' or 'medialibrarycopyrightowner') that need validation or have the purple dam plugin active with exif and/or iptc data enbaled description ticket https //purplepublish atlassian net/browse/backend 5397 https //purplepublish atlassian net/browse/backend 5397 looms enabling validation on image blocks using purple blocks navigate to the image block in purple hub, go to the section where purple blocks (image blocks) are managed you can set a block as "required" for a post, meaning that the post will not be published unless the block contains valid content new validation options there are now two additional validation options for image blocks image requirement the block must contain an image custom field validation custom fields (such as metadata) must be filled in for each image setting custom field validation copy the name of the required field (e g , "media library copyright owner") for exif/iptc fields from the purple dam plugin, specify the required fields based on their internal name like mlo exif grouped author or mlo iptc grouped headline in the purple blocks settings, specify that this field must always be filled in for images save the settings once saved, this requirement will be enforced in all image blocks testing the validation create a new article and add an image block using purple blocks select an image from the media library that does not have the required custom field (e g , "media library copyright owner") set a warning will appear stating that the image is missing the required field, and the article cannot be published until the field is filled in resolving validation issues to resolve the issue, either choose an image that already has the required metadata or manually set the missing field for the selected image once the field is set correctly, the warning will disappear, and the article can be published validating the presence of an image you can also configure the image block to require that an image must be selected if an image block is added without an image, a validation error will appear, preventing publication of the article until an image is selected publishing with validated images once all validations (image selection and custom field requirements) are satisfied, the article can be published without any errors enabling validation for featured images the same kind of validations can be defined separately for the featured image of an article see validating the featured image docid\ glpdx1mguplnnl wdgigt example of validation in action if an image is selected that does not have the required "media library copyright owner" field, a message will appear stating, "the selected image does not contain the media library copyright owner field " if no image is selected for an image block, another warning will appear indicating that the article cannot be published without a valid image the configured fields also show up in the block editor sidebar, where a link is provided to open them directly in the media library, where the fields can then be edited image caption preview using purple blocks similar to required fields, it is also possible to configure fields that are supposed to show up underneath an image to generate an image preview here's how to configure it open the validation settings for the image block in purple blocks and activate the "meta fields as image caption" setting enter here the image meta fields that should show up as image caption in the editor underneath the image save the settings if you now open an article containing images, the configured fields are shown as caption on the right underneath images