Make lint happy
This commit is contained in:
parent
3cf6c2b7ea
commit
8bb2e52d2e
1 changed files with 7 additions and 7 deletions
|
@ -771,7 +771,7 @@ defmodule Pleroma.User do
|
|||
end
|
||||
|
||||
def validate_not_restricted_nickname(changeset, field) do
|
||||
validate_change changeset, field, fn _, value ->
|
||||
validate_change(changeset, field, fn _, value ->
|
||||
valid? =
|
||||
Config.get([User, :restricted_nicknames])
|
||||
|> Enum.all?(fn restricted_nickname ->
|
||||
|
@ -779,11 +779,11 @@ defmodule Pleroma.User do
|
|||
end)
|
||||
|
||||
if valid?, do: [], else: [nickname: "Invalid nickname"]
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
def validate_email_not_in_blacklisted_domain(changeset, field) do
|
||||
validate_change changeset, field, fn _, value ->
|
||||
validate_change(changeset, field, fn _, value ->
|
||||
valid? =
|
||||
Config.get([User, :email_blacklist])
|
||||
|> Enum.all?(fn blacklisted_domain ->
|
||||
|
@ -796,7 +796,7 @@ defmodule Pleroma.User do
|
|||
end)
|
||||
|
||||
if valid?, do: [], else: [email: "Invalid email"]
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
def maybe_validate_required_email(changeset, true), do: changeset
|
||||
|
|
Loading…
Reference in a new issue