Note: This example shows an error if the input field is empty and the checkbox is checked for "required".