From d947d761a5d63ea3d09788ee97fadce46c412a8d Mon Sep 17 00:00:00 2001 From: bytecode1024 <58328948+bytecode1024@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:24:49 +0100 Subject: [PATCH] Fix upper limit of range A-Z (#1668) Since the A-z range includes [, \, ], ^, _, and `, I assume this is a typo on the upper limit of the A-Z range. --- lib/plausible/site/schema.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plausible/site/schema.ex b/lib/plausible/site/schema.ex index 625c5bcd6..f15f9ef76 100644 --- a/lib/plausible/site/schema.ex +++ b/lib/plausible/site/schema.ex @@ -28,7 +28,7 @@ defmodule Plausible.Site do site |> cast(attrs, [:domain, :timezone]) |> validate_required([:domain, :timezone]) - |> validate_format(:domain, ~r/^[a-zA-z0-9\-\.\/\:]*$/, + |> validate_format(:domain, ~r/^[a-zA-Z0-9\-\.\/\:]*$/, message: "only letters, numbers, slashes and period allowed" ) |> unique_constraint(:domain)