Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-08-11 16:44:13 +02:00
parent 366559c5a3
commit b430b805c4

View file

@ -494,7 +494,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do
{:error, dgettext("errors", "Too many attachments")}
end
end
def is_good_locale_code?(code) when is_binary(code), do: code =~ ~r<[A-zA-Z0-9\-]+>
def is_good_locale_code?(code) when is_binary(code), do: code =~ ~r<^[a-zA-Z0-9\-]+$>
def is_good_locale_code?(_code), do: false
end