def is_language(value):

    if value is None:
        return

    if not isinstance(value, str) or len(value) != 2:
        return c('language')
Entity must be ISO 639-1 code.
dataset/ETHPy150Open heiskr/sagefy/server/modules/validations.py/is_language