The scenario I am going to go over in this article is that you have 5 checkboxes and want to validate that 3 of them are checked before being able to save the form.
To do this, we will need to create a parameter to validate how many checkboxes are checked:
Once we have created the parameter ( I titled mine "3checked"), we need to create a custom expression to increment and decrement the parameter.
(The Decrement will be the same thing except with a minus sign)
Once we have the parameter and the expressions we need, then we can start configuring the rules.
We will need to do this next set of rules for each of the check boxes. We will be firing off this rule every time the checkbox is checked or unchecked. If it's checked we will increment the counter, if not, we will decrement the counter.
Here's what the transfer data section looks like:
Once we have set up the rules for each of the checkboxes, we will then place an advanced condition on the "When Save Button is Clicked" rule.
Inside the advanced condition, we will specify that 3checked needs to be greater than or equal to 3.
After this, the form's rules will validate that at least 3 checkboxes are checked before allowing you to save the form.