In this example, we will display an error if the field is empty AND the checkbox is checked for "required".