@classmethod
def validate_enum_field(cls, value, enum_list, null=True):
    """
        Validate enum field value

        :type value: object
        :param value:

        :type enum_list: list
        :param enum_list: list of allow value

        :type null: bool
        :param null: is allow None value

        :rtype: dict
        :return: {'is_valid':bool, 'error_msg':str}
        """
    is_valid = True
    error_msg = None
    if null is False and value is None:
        is_valid = False
        error_msg = 'Data should not be None'
    if value is not None:
        if value in enum_list is False:
            is_valid = False
            error_msg = 'Data value should be from list: {}'.format(enum_list)
    return {'is_valid': is_valid, 'error_msg': error_msg}
