A plugin used to validate relations when publishing an entry
This plugin allows the validation of publication to check whether the relations are PUBLISHED.
npm install strapi-plugin-validate-relations
yarn add strapi-plugin-validate-relations
The populate depth is calculated by strapi built-in capability (i.e. WYSIWYG). Deeper nested relations will not be validated if it's not explored by the populate
.
e.g. the relation chain is:
Homepage
->Menu
->Link
, when editingHomepage
, it will not validate if theLink
connected to aMenu
is DRAFT since the populate ofHomepage
will not include it, however, if the selectedMenu
is DRAFT, error will be returned.
Currently the plugin will throw the validation error immediately when a DRAFT relation is found.
config/plugins.js
1module.exports = ({ env }) => ({
2 'strapi-plugin-validate-relations': {
3 enabled: true
4 },
5});
npm install strapi-plugin-validate-relations
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.