def validate_language(value):
    """Check if `value` is a valid language.
       https://docs.mongodb.com/manual/reference/text-search-languages/

        Args:
            value (str): language to validated

        Returns:
            None: validation successful

        Raises:
            ValidationError: will raise exception in case language is not valid.
    """
    if value not in VALID_LANGUAGES:
        error_str = ('MongoDB does not support text search for the '
                     'language "{}". If you do not understand this error '
                     'message then please rename key/field "language" to '
                     'something else like "lang".').format(value)
        raise ValidationError(error_str)
Check if `value` is a valid language.
https://docs.mongodb.com/manual/reference/text-search-languages/

Args:
value (str): language to validated

Returns:
None: validation successful

Raises:
ValidationError: will raise exception in case language is not valid.
bigchaindb/backend/schema.py