First edit your checkbox element.
- Select the "Advanced" section
- Define the "Max characters/selections allowed" and set it to 2, to limit the possible checkbox item selection to two.
- Optionally define a minimum, if you want to make the checkbox a required field
Now click "Update Element" to save your changes.
Now when a user fills out the form they are required to choose at least 1 option and a maximum of 2.