def METHOD_NAME(value):
    if not USERNAME_RE.match(value):
        raise ValidationError(
            pgettext_lazy(
                "username validator",
                "Username can only contain Latin alphabet letters, digits, and an underscore sign.",
            )
        )
    if not USERNAME_LATIN_ALPHA_RE.search(value):
        raise ValidationError(
            pgettext_lazy(
                "username validator",
                "Username must contain Latin alphabet letters or digits.",
            )
        )