code: def clean(self):
          
          if self.event not in HOOK_EVENTS.keys():
              raise ValidationError(
                  "Invalid hook event {evt}.".format(evt=self.event)
              )
docs: Validation for events.