Admin
Content Model

Validating the Featured Image

5min

Summary

This article describes how to use the Featured Image Meta Information Validation feature within Purple Hub. The feature ensures that custom fields (such as copyright ownership) are filled in for images used as featured images of articles, and that articles have a featured image in the first place.



Preconditions

  • Have an Admin role in Purple Hub
  • Have a field group and a custom field defined that applies to images.Create Custom Fields in Purple Hub
  • Have the name of your custom field by hand (e.g., 'ImageCredits' or 'MediaLibraryCopyrightOwner') that need validation.

  • Navigate to the Purple settings page, and find the settings for featured image validations there. The settings are close by the ones for Character Limits in Purple Hub.
Document image

  • Select the first checkbox if you want to enforce that every article has a featured image selected.
  • Paste in the names of your ACF fields in the second setting text box, separated by commas. This setting works similarly to the same one on image blocks. See Validating Image Blocks and Meta Information.
  • If either of these validations fail, a red error banner is shown in the editor, and publishing the article will not be possible.


Results in the editor:

"Featured image is required" but not set in an article
"Featured image is required" but not set in an article

One of the "Featured image required meta fields" is not set on the selected featured image
One of the "Featured image required meta fields" is not set on the selected featured image