!String.ends_with?(email, ["@" <> blacklisted_domain, "." <> blacklisted_domain])
end)
- if valid?, do: [], else: [email: "Email domain is blacklisted"]
+ if valid?, do: [], else: [credentials: "Invalid credentials"]
end)
|> unique_constraint(:nickname)
|> validate_exclusion(:nickname, Config.get([User, :restricted_nicknames]))
|> put_req_header("authorization", "Bearer " <> token)
|> post("/api/v1/accounts", params)
- assert %{"error" => "{\"email\":[\"Email domain is blacklisted\"]}"} =
+ assert %{"error" => "{\"credentials\":[\"Invalid credentials\"]}"} =
json_response_and_validate_schema(conn, 400)
Pleroma.Config.put([User, :email_blacklist], [])