Commit aef7e943 authored by lambadalambda's avatar lambadalambda
Browse files

Merge branch 'bugfix/ascii-alphanumeric-names' into 'develop'

Add restriction on names

Closes #15

See merge request !15
parents a3b9741a 668b01da
......@@ -63,6 +63,7 @@ def register_changeset(struct, params \\ %{}) 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])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment