def METHOD_NAME(settings, value):
    value_len = len(value)
    if not value_len:
        raise ValidationError(
            pgettext(
                "thread title length validator", "You have to enter an thread title."
            )
        )
    if value_len < settings.thread_title_length_min:
        # pylint: disable=line-too-long
        message = npgettext(
            "thread title length validator",
            "Thread title should be at least %(limit_value)s character long (it has %(show_value)s).",
            "Thread title should be at least %(limit_value)s characters long (it has %(show_value)s).",
            settings.thread_title_length_min,
        )
        raise ValidationError(
            message
            % {"limit_value": settings.thread_title_length_min, "show_value": value_len}
        )
    if value_len > settings.thread_title_length_max:
        # pylint: disable=line-too-long
        message = npgettext(
            "thread title length validator",
            "Thread title cannot be longer than %(limit_value)s character (it has %(show_value)s).",
            "Thread title cannot be longer than %(limit_value)s characters (it has %(show_value)s).",
            settings.thread_title_length_max,
        )
        raise ValidationError(
            message
            % {"limit_value": settings.thread_title_length_max, "show_value": value_len}
        )