<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate(cls):
 """ Validate required elements. """

        if not SWITCHER_EL.checked:
            return True

        if not cls.selected_code:
            cls.original_author_el.style.border = "2px solid red"
            return False

        cls.original_author_el.style.border = "0"
        return True