mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 14:45:16 +00:00
Add restriction on names
This commit is contained in:
parent
a3b9741a62
commit
668b01da0b
|
@ -63,6 +63,7 @@ defmodule Pleroma.User do
|
|||
|> validate_confirmation(:password)
|
||||
|> unique_constraint(:email)
|
||||
|> unique_constraint(:nickname)
|
||||
|> validate_format(:nickname, ~r/^[a-zA-Z\d]+$/)
|
||||
|
||||
if changeset.valid? do
|
||||
hashed = Comeonin.Pbkdf2.hashpwsalt(changeset.changes[:password])
|
||||
|
|
Loading…
Reference in a new issue