diff --git a/priv/templates/phx.gen.auth/schema.ex b/priv/templates/phx.gen.auth/schema.ex index 13ff8f1db5..b289b3e0b8 100644 --- a/priv/templates/phx.gen.auth/schema.ex +++ b/priv/templates/phx.gen.auth/schema.ex @@ -46,7 +46,9 @@ defmodule <%= inspect schema.module %> do defp validate_email(changeset, opts) do changeset |> validate_required([:email]) - |> validate_format(:email, ~r/^[^\s]+@[^\s]+$/, message: "must have the @ sign and no spaces") + |> validate_format(:email, ~r/^[^@,;\s]+@[^@,;\s]+$/, + message: "must have the @ sign and no spaces" + ) |> validate_length(:email, max: 160) |> maybe_validate_unique_email(opts) end