Open the resource configuration. Add a Reaction.
Enter a name. Select the reaction type — Show error. Enter the error message text and click Add condition.
Select Number of hares of the selected price option and set the maximum value to 2. This will prevent users from booking one or two tickets. Save your changes.
The error message will be displayed with a red line. It appears when selecting options and prevents proceeding to the cart to complete the order.
See it in action: