Now, in the Example App, in editing mode, open a page, e.g. “Jobs” from the “About” menu, and take a look at the notification icon on the sidebar: If it doesn’t indicate an error on the page, you’ve either left the page unchanged in the working copy (see the note on the screenshot), or added an image manually.
After clicking the icon to open the “Notifications” panel, the error message we specified in our above validation definition should be visible.
You will have noticed that the error is displayed even though the page includes several images. The header image, as well as the images on the social cards properties tab, don’t count because they aren’t widgets, but what about the carousel further down on the page? We could demand that the page includes at least one ImageWidget
or CarouselWidget
by changing the filter function accordingly: