Contentstack provides Modular Blocks which allows users to dynamically create components of an app or website, by adding multiple sets of fields within each block. Once added, you can choose any block of your choice (such as banner, disclaimer, and so on), add more blocks, rearrange them, or remove them to make changes to the web page or app in your entry.
In this example, we will learn how to set up certain rules on modular blocks to ensure only the required number of blocks are added in the entry. We will use Contentstack Webhooks and AWS Lambda to set up this system.
We have created a detailed tutorial on Modular Blocks Validation. Use the steps mentioned in the guide and set up the required validation.
If the validation succeeds, the workflow stage changes to "Approved" as shown below:
If the validation fails, the workflow stage changes to "Rejected" as shown below:
Read Contentstack docs
Read Guide Validating Modular Blocks using Contentstack Webhooks and AWS Lambda