def _validate_trigger_type(trigger_type):
    """
    XXX: We need validator objects that define the required and optional fields.
    For now, manually check them.
    """
    required_fields = ["name"]
    for field in required_fields:
        if field not in trigger_type:
            raise TriggerTypeRegistrationException(
                'Invalid trigger type. Missing field "%s"' % (field)
            )

    XXX: We need validator objects that define the required and optional fields.
    For now, manually check them.
    
st2common/st2common/services/triggers.py